Libraries |
|
LZW | Source Code |
|
|
Function Summary | |||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
|
Function Detail |
lzwCompressLsb
const func string: lzwCompressLsb (in string: uncompressed, in integer: codeSize)
-
Compress a string with the Lempel-Ziv-Welch (LZW) compression method. The packing order of bits in bytes is LSB-First (Least Significant Bit First). This compression method is used for GIF files. Compressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- uncompressed - Data to be compressed
- codeSize - Number of bits used by the uncompressed data.
- Returns:
- Compressed byte string of the uncompressed data.
lzwDecompress
const func string: lzwDecompress (inout lsbInBitStream: compressedStream, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed lsbInBitStream. The packing order of bits in bytes is LSB-First (Least Significant Bit First). This compression method is used for GIF files. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwDecompressLsb
const func string: lzwDecompressLsb (in string: compressed, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed string. The packing order of bits in bytes is LSB-First (Least Significant Bit First). This compression method is used for GIF files. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwCompressMsb
const func string: lzwCompressMsb (in string: uncompressed, in integer: codeSize)
-
Compress a string with the Lempel-Ziv-Welch (LZW) compression method. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in PDF files. Compressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- uncompressed - Data to be compressed
- codeSize - Number of bits used by the uncompressed data.
- Returns:
- Compressed byte string of the uncompressed data.
lzwDecompress
const func string: lzwDecompress (inout msbInBitStream: compressedStream, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed msbInBitStream. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in PDF files. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwDecompressMsb
const func string: lzwDecompressMsb (in string: compressed, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed string. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in PDF files. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwCompressMsbEarlyChange
const func string: lzwCompressMsbEarlyChange (in string: uncompressed, in integer: codeSize)
-
Compress a string with the Lempel-Ziv-Welch (LZW) compression method. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in TIFF and PDF files. EarlyChange means that the encoding width changes one code too early. Compressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- uncompressed - Data to be compressed
- codeSize - Number of bits used by the uncompressed data.
- Returns:
- Compressed byte string of the uncompressed data.
lzwDecompressEarlyChange
const func string: lzwDecompressEarlyChange (inout msbInBitStream: compressedStream, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed msbInBitStream. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in TIFF and PDF files. EarlyChange means that the encoding width changes one code too early. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwDecompressMsbEarlyChange
const func string: lzwDecompressMsbEarlyChange (in string: compressed, in integer: codeSize)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed string. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in TIFF and PDF files. EarlyChange means that the encoding width changes one code too early. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- Returns:
- Decompressed version of the compressed data.
lzwDecompressEarlyChange
const func string: lzwDecompressEarlyChange (inout msbInBitStream: compressedStream, in integer: codeSize, in integer: requestedLength)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed msbInBitStream. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in TIFF and PDF files. EarlyChange means that the encoding width changes one code too early. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- requestedLength - Number of decompressed bytes to be read.
- Returns:
- Decompressed version of the compressed data.
lzwDecompressMsbEarlyChange
const func string: lzwDecompressMsbEarlyChange (in string: compressed, in integer: codeSize, in integer: requestedLength)
-
Decompress an Lempel-Ziv-Welch (LZW) compressed string. The packing order of bits in bytes is MSB-First (Most Significant Bit First). This compression method is used in TIFF and PDF files. EarlyChange means that the encoding width changes one code too early. Decompressing starts with succ(codeSize) bits per coding point and goes up to 12 bits per coding point. The code points 0 to pred(2 ** codeSize) correspond to unchanged data. Code 2 ** codeSize starts a new block with a new table and succ(codeSize) bits per code point. Code succ(2 ** codeSize) marks the end of the compressed data.
- Parameters:
- compressed - Byte string to be decompressed.
- codeSize - Number of bits used by the decompressed data.
- requestedLength - Number of decompressed bytes to be read.
- Returns:
- Decompressed version of the compressed data.
|
|