Skip to content

cf_snapshot_decompress

Category: net
GitHub: cute_networking.h


Reconstructs a snapshot from a baseline and a compressed delta.

int cf_snapshot_decompress(const void* baseline, int size, const void* compressed, int compressed_size, void* out);
Parameters Description
baseline The same baseline passed to cf_snapshot_compress (or NULL).
size The snapshot size in bytes (known to both sides).
compressed The compressed delta bytes.
compressed_size The number of compressed bytes.
out Destination buffer for the reconstructed snapshot, size bytes.

Return Value

Returns 0 on success, or -1 for malformed input (no flag byte, or a truncated raw payload).

cf_snapshot_compress
cf_snapshot_compress_bound
cf_client_pop_packet
cf_server_pop_event