Skip to main content

Module output

Module output 

Source
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/.idx pair into output_dir.