Expand description
QLOG file writer plumbing – compression-aware companion to
crate::reader.
This module owns the writer-side surface for emitting JSON-SEQ
qlog streams, optionally wrapped in a streaming compressor. It is
a deliberate exception to the qlog crate’s otherwise pure-data
posture: the writer helpers, the compression enum, and the
filename / extension conventions live here so any consumer
(tokio-quiche, crate::reader::QlogSeqReader::with_file,
external tooling) shares a single canonical writer story.
Compression is opt-in via Cargo features:
gzippulls inflate2.zstdpulls in the [zstd] crate (C dependency viazstd-sys).
The QlogCompression enum’s Gzip and Zstd variants are
compile-time gated on their respective features, so a build that
disables one of them cannot construct the unsupported variant.
Bytes flow producer -> [compressor] -> W where W is any
Write + Send + Sync + 'static. No buffering is added here: both
flate2 and zstd emit output in large chunks (DEFLATE blocks /
zstd frames), so an extra BufWriter is redundant; callers are
free to add one if they need to.
Enums§
- Qlog
Compression - Compression algorithm applied to QLOG output streams.
Functions§
- make_
qlog_ writer - Wrap
innerin the streaming encoder selected bycompressionand return a boxedWritethat a qlog producer (e.g. quiche viaset_qlog) writes into. - make_
qlog_ writer_ from_ path - Convenience function to create a File at
pathwith a writer based oncompression. - qlog_
file_ name - Return the qlog filename (not including the directory) for a
stream whose identifier is
id, with the suffix matchingcompression:<id>.sqlog,<id>.sqlog.gz, or<id>.sqlog.zst.
Type Aliases§
- Qlog
File Writer - Boxed
Writereturned bymake_qlog_writer/make_qlog_writer_from_path.