Structs§
- Forward
Text - The text of one file, read from the front.
Enums§
- Compression
- Detected compression format based on magic bytes.
- File
Contents - Holds file contents either as an owned String or a memory-mapped region.
Functions§
- 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_
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.