31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

void<br />

C.set compression level(int level)<br />

sets the compression level (between 0 and 9), whereas<br />

0 means no compression, 1 gives the best speed and 9<br />

yields the highest compression.<br />

int C.get window size( ) returns the base two logarithm of the size of the sliding<br />

window used by the deflation algorithm.<br />

void<br />

int<br />

void<br />

C.set window size(int log2 of sz)<br />

sets the window size (log2 of sz must be between 8<br />

and 15).<br />

C.get memory level( ) returns the current memory level.<br />

C.set memory level(int level)<br />

sets the memory level (between 1 and 9). <strong>The</strong> higher<br />

this number, the higher the memory consumption.<br />

int C.get strategy( ) returns the current strategy for the deflation algorithm.<br />

void<br />

void<br />

C.set strategy(int strategy)<br />

sets the compression strategy (between 0 and 3):<br />

0=default, 1=optimization for filtered data, i.e. small<br />

values with random distribution, 2=Huffman only (no<br />

string matching), 3=RLE (for image data).<br />

C.get memory consumption(uint32 & mem for enc, uint32 & mem for dec)<br />

returns the (approximate) memory consumption (in<br />

bytes) needed for encoding and decoding repectively.<br />

uint32 C.get enc buffer size( )<br />

returns the size of the buffer for encoded data.<br />

void<br />

C.set enc buffer size(uint32 buffer size)<br />

sets the size of the buffer for encoded data.<br />

uint32 C.get dec buffer size( )<br />

returns the size of the buffer for decoded data.<br />

void<br />

C.set dec buffer size(uint32 buffer size)<br />

sets the size of the buffer for decoded data.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!