content_store

allows attomic reading and writing of compressed content blobs

content_store

This shard allows storing content collections, where each item can contain many parts or sub-items. Content is combined into tar files, and then compressed with zstd.

Each archive can contain multiple named files. Callers can open an item, list entries, check existence, read files, write files, and close the item to recompress changes.

It supports two archive backends:

  • Bsdtar, the default, using the system bsdtar command.
  • Native, using Crystal shards for tar and zstd support.

The library keeps writes in a temporary directory until close, then merges them with the existing archive. This allows pending writes to override existing archive entries while preserving untouched content. It also provides metadata helpers, including checks for zero-length content files without extracting archive contents.

Repository

content_store

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 2
  • 21 days ago
  • July 17, 2024
License

Links
Synced at

Wed, 15 Jul 2026 14:48:45 GMT

Languages