ocean.io.compress.lzo.LzoChunk

LZO1X-1 (Mini LZO) compressor/uncompressor generating/accepting chunks of compressed data with a length and checksum header

Usage example:

import $(TITLE);

void[] lzo_chunk;
void[] uncompressed_chunk;

void run ( )
{
    scope lzo = new LzoChunk;

    // preallocate lzo_chunk and uncompressed_chunk (optional)

    lzo_chunk = new void[LzoChunk.maxChunkLength(4096)];

    uncompressed_chunk  = new void[4096];

    char[] data;

    // populate data with data to compress...

    lzo.compress(data, lzo_chunk);

    // lzo_chunk now holds an LZO chunk with compressed data

    lzo.uncompress(lzo_chunk, uncompressed);

    // uncompressed_chunk now holds data, restored from lzo_chunk
}

Members

Classes

LzoChunk
class LzoChunk(bool LengthInline = true)

LzoChunk compressor/decompressor

Functions

lrintf
int lrintf(float x)

Rounds x to the nearest integer value

Structs

Terminator
struct Terminator

Terminator structure

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).