This package provides custom processing routines to deal with compressed binary data. Implementations are provided for:
- JavaScript
- Python
- Ruby
Note that most implementations are actually wrappers which route calls to well-known implementations for that languages.
To use these routines, one should add processing instruction into .ksy file and then add relevant language-specific implementations into one's project.
To use it, just invoke the following in your .ksy:
process: kaitai.compress.PROCESS_NAME(ARGUMENTS)
where PROCESS_NAME
and ARGUMENTS
should be as described in the table below.
Fully working example:
meta:
id: example_lz4
seq:
- id: buf
size: 50
process: kaitai.compress.lz4
Add javascript/ to one's NODE_PATH
.
Add python/ to one's PYTHONPATH
.
Add ruby/lib/ to one's $LOAD_PATH
.
Algorithm | Process name | Arguments | Conforming | Test file extension |
---|---|---|---|---|
Brotli | brotli |
None | RFC 7932 | br |
LZ4 | lz4 |
None | LZ4 block specification | lz4 |
LZMA | lzma_raw |
None | Raw LZMA stream | lzma_raw |
LZMA | lzma_lzma |
None | Legacy .lzma file format (AKA alone) | lzma |
LZMA | lzma_xz |
None | .xz file format | xz |
DEFLATE (AKA zlib) | zlib |
None | RFC 1951 | zlib |
zstd (AKA zstandard) | zstd |
None | Spec & ref implementation | zst |