![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
LZ4 block-compression handler. More...
#include "n_str.h"
Include dependency graph for n_lz4.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| N_STR * | unzip4_nstr (N_STR *src) |
| Return an uncompressed version of src produced by zip4_nstr. | |
| N_STR * | zip4_nstr (N_STR *src) |
| Return a compressed version of src using LZ4 block format. | |
LZ4 block-compression handler.
Companion to n_zlib.h that wraps the lz4 reference implementation shipped under external/lz4/. Same self-framing layout as zip_nstr (u32 original size in network byte order + compressed payload), just a different codec inside. Picked when callers want speed over ratio, LZ4 compresses ~25x faster and decompresses ~10x faster than zlib at a ~25 % ratio cost on text / JSON payloads.
Definition in file n_lz4.h.