Skip to content

A library that mimic fread, fseek and ftell for reading zstd compressed files.

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

martinellimarco/libzstd-seek

Repository files navigation

AUR version

libzstd-seek

This is a library to read zstd files at arbitraty positions.

The library has 3 main methods that mimic fread, fseek and fteel.

The usage is pretty simple.

You first create a new ZSTDSeek_Context from a file or a buffer in memory.

You then can use ZSTDSeek_read, ZSTDSeek_seek or ZSTDSeek_tell as you please to read uncompressed data.

In the end remember to free the context with ZSTDSeek_free.

This library can now decode the skiptable of the seekable format.

Compile

mkdir build
cd build
cmake ..
make

If you want to get debug messages then #define _ZSTD_SEEK_DEBUG_ 1

Tests

Tests are in a separate project, libzstd-seek-tests.

Licensing

This source code is licensed under both the MIT license (found in the LICENSE file) and the GPLv3 (found in the COPYING file).

You may select, at your option, one of the above-listed licenses.

About

A library that mimic fread, fseek and ftell for reading zstd compressed files.

Resources

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published