FreeBSD ZFS
The Zettabyte File System
|
Zero-length encoding. More...
#include <sys/types.h>
#include <sys/sysmacros.h>
Go to the source code of this file.
Functions | |
size_t | zle_compress (void *s_start, void *d_start, size_t s_len, size_t d_len, int n) |
int | zle_decompress (void *s_start, void *d_start, size_t s_len, size_t d_len, int n) |
Zero-length encoding.
This is a fast and simple algorithm to eliminate runs of zeroes. Each chunk of compressed data begins with a length byte, b. If b < n (where n is the compression parameter) then the next b + 1 bytes are literal values. If b >= n then the next (256 - b + 1) bytes are zero.
Definition in file zle.c.
size_t zle_compress | ( | void * | s_start, |
void * | d_start, | ||
size_t | s_len, | ||
size_t | d_len, | ||
int | n | ||
) |