Expand description
Top-level convenience: encode entries directly to a .pack / .idx file pair.
The pack is first written to a temporary file because its final name contains the checksum, which is not known until encoding completes. A background task drains the encoder’s pack channel while the caller-facing task performs encoding. After the pack is finalized and renamed, a second writer drains the generated index bytes.
Functions§
- encode_
and_ output_ to_ files - Consume entries and write a matching
.pack/.idxpair intooutput_dir.