zstd/build/single_file_libs/examples
W. Felix Handte 1d65917323 Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
..
README.md Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
emscripten.c Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
roundtrip.c Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
shell.html Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
simple.c Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
testcard-dxt1.inl Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
testcard-zstd.inl Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00
testcard.png Move Single-File Build Script from `contrib/` to `build/` 2021-05-05 16:07:51 -04:00

README.md

Single File ZStandard Examples

The examples #include the generated zstddeclib.c directly but work equally as well when including zstd.h and compiling the amalgamated source separately.

simple.c is the most basic example of decompressing content and verifying the result.

emscripten.c is a bare-bones Emscripten compiled WebGL demo using Zstd to further compress a DXT1 texture (see the original PNG image). The 256x256 texture would normally be 32kB, but even when bundled with the Zstd decompressor the resulting WebAssembly weighs in at 41kB (shell.html is a support file to run the Wasm).

roundtrip.c is an example to use with the optional amalgamated library showing compression the decompression.

The example files in this directory are released under a Creative Commons Zero license (or Public Domain, whichever is applicable in your jurisdiction).