robot-ya-builder 96458ea3c7 External build system generator release 65 1 год назад
..
codecs 96458ea3c7 External build system generator release 65 1 год назад
core 96458ea3c7 External build system generator release 65 1 год назад
fuzz e601ca03f8 Y_VERIFY->Y_ABORT_UNLESS at ^l 1 год назад
ut bf0f13dd39 add ymake export to ydb 1 год назад
CMakeLists.darwin-arm64.txt ffff7a34e4 add darwin-arm64 CMakeLists 1 год назад
CMakeLists.darwin-x86_64.txt 33ed6077e6 Intermediate changes 2 лет назад
CMakeLists.linux-aarch64.txt 9f448c9c67 Intermediate changes 2 лет назад
CMakeLists.linux-x86_64.txt 33ed6077e6 Intermediate changes 2 лет назад
CMakeLists.txt 96458ea3c7 External build system generator release 65 1 год назад
CMakeLists.windows-x86_64.txt 6324d075a5 Intermediate changes 2 лет назад
README.md 110a978b66 Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 2 of 2. 3 лет назад
codecs.cpp 110a978b66 Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 2 of 2. 3 лет назад
codecs.h 110a978b66 Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 2 of 2. 3 лет назад
codecs_ut.cpp 9abfb1a53b Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2. 3 лет назад
stream.cpp 110a978b66 Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 2 of 2. 3 лет назад
stream.h 110a978b66 Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 2 of 2. 3 лет назад
ya.make bf0f13dd39 add ymake export to ydb 1 год назад

README.md

This is a simple library for block data compression (this means data is compressed/uncompressed by whole blocks in memory). It's a lite-version of the library/cpp/codecs. Lite here means that it provide only well-known compression algorithms, without the possibility of learning.

There are two possible ways to work with it.

Codec by name

Use NBlockCodec::Codec to obtain the codec by name. The codec can be asked to compress or decompress something and in various ways.

To get a full list of codecs there is a function NBlockCodecs::ListAllCodecs().

Streaming

Use stream.h to obtain simple streams over block codecs (buffer data, compress them by blocks, write to the resulting stream).

Using codec plugins

If you don't want your code to bloat from unused codecs, you can use the small version of the library: library/cpp/blockcodecs/core. In that case, you need to manually set PEERDIR()s to needed codecs (i.e. PEERDIR(library/cpp/blockcodecs/codecs/lzma)).