Structs§
- Forward
Text - The text of one file, read from the front.
Enums§
- Byte
Source - Bytes of one file, mapped when a plain file is large enough.
- Compression
- Detected compression format based on magic bytes.
- File
Contents - Holds file contents either as an owned String or a memory-mapped region.
Constants§
- GZIP_
LEVEL - zlib/gzip level used for CON payloads.
- MMAP_
THRESHOLD - Size in bytes from which
read_file_contentsmaps an uncompressed file. A smaller one is read into aString. - ZSTD_
LEVEL - zstd level used for CON payloads. Level 3 is the zstd CLI default.
Functions§
- advise_
dontneed_ parallel - Drop resident pages of
maponworkersthreads, then the caller unmaps. Each thread advises a disjoint byte range. The page size issysconf(SC_PAGESIZE), not a host-tuned cutoff. - codec_
deflate - Deflate
plainintomembersslices onthreadsworkers. - codec_
inflate - Inflate a gzip or zstd buffer with
threadsworkers and no CON parse. - compression_
workers - How many independent compression members a payload of
nbytesuses. - default_
deflate_ threads - Deflate workers for a write that did not ask for a thread count.
- detect_
compression - Detect compression format from the first bytes of a file.
- detect_
compression_ from_ extension - Detect compression format from a file extension.
- gzip_
writer - Creates a gzip-compressed writer wrapping a file at the given path.
- open_
decoded - The bytes of
pathas one stream, decompressed while it is read. - read_
bytes_ owned - Load
pathfor a parse. SeeByteSource. - read_
file_ bytes - File bytes in one read when the file is not compressed.
- read_
file_ contents - Reads file contents, decompressing if needed.
- read_
file_ contents_ detected read_file_contents, also returning the compression it detected.- read_
file_ text read_file_contentsas one ownedString. An uncompressed file is read into it at any size instead of being mapped, so the text is held once and later changes to the file do not reach it.- with_
decode_ threads - Run
bodywith indexed members inflated on at mostthreadsworkers. - with_
serial_ decode - Run
bodywith multi-member inflation forced onto one thread. - write_
fused_ gzip_ frame write_gzip_members_nwith a separate worker count.- write_
gzip_ members - Writes
dataas gzip members atGZIP_LEVEL. - write_
gzip_ members_ limited - write_
gzip_ members_ n write_gzip_memberswith an explicit member count.