Expand description
§srcdmp
An amazing source code snapshot library and CLI tool.
srcdmp packs entire project directories into compact binary archive files
(.srcdmp) using a family of specialized codecs. It provides both a
command-line interface and a library API for creating, inspecting, and
extracting snapshots.
§Feature Flags
cli(enabled by default): CLI tooling, TUI viewer, and colored output.fs(enabled by default): Filesystem operations viaDump,DumpBuilder, andDumpWriteBuilder.
§Codecs
| Codec | ID | Description |
|---|---|---|
| SDMP-7 | 0x07 | Three-tier compression optimized for source code ASCII characters |
| SDMP-8 | 0x08 | Raw UTF-8 passthrough, no compression |
| SDMP-C4 | 0x04 | Huffman-tree-based compression using empirically derived frequencies |
| SDMP-C2 | 0x02 | Reserved for future use |
§Quick Start
use srcdmp::{Dump, Codec};
let dump = Dump::from_dir(".")
.codec(Codec::Compact4)
.gitignore()
.build()
.expect("failed to build snapshot");
println!("packed {} files, {} bytes", dump.file_count(), dump.original_size());Modules§
Structs§
- Dump
- A compressed snapshot of a source directory.
- Dump
Builder - Builder for constructing a
Dumpfrom a directory on disk. - Dump
Write Builder - Builder for writing a
Dumpto a date-stamped filename.
Enums§
- Codec
- The compression codec used when encoding a snapshot.
Functions§
- unpack_
bytes - Decode a complete
.srcdmparchive from an in-memory byte slice.