mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-28 18:22:06 +01:00
ZipReader::find scanned every entry per lookup, and a bundle load looks up one entry per tile reference, so loads were O(refs x entries). Build a name -> index map once in ZipReader::new (first entry wins for duplicate names, as the scan did) and look names up through it. crc32 now delegates to crc32fast (already in Cargo.lock via flate2) instead of a byte-at-a-time table loop. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.1 KiB
TOML
34 lines
1.1 KiB
TOML
[package]
|
|
name = "photocraft-format"
|
|
description = "Native .pcraft document bundle: manifest + content-addressed zstd tiles"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
photocraft-geom = { workspace = true }
|
|
photocraft-color = { workspace = true }
|
|
photocraft-raster = { workspace = true }
|
|
photocraft-doc = { workspace = true }
|
|
photocraft-codecs = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true, features = ["unbounded_depth"] }
|
|
thiserror = { workspace = true }
|
|
flate2 = { workspace = true }
|
|
# Same IEEE CRC-32 the ZIP container needs; already in Cargo.lock through flate2.
|
|
crc32fast = "1.5"
|
|
blake3 = { version = "1.8", default-features = false, features = ["pure"] }
|
|
ruzstd = "0.9"
|
|
|
|
# A plain fsync where a file system refuses the full flush (`sync_file`, atomic.rs). Already in
|
|
# Cargo.lock on Apple targets (cap-std), so this adds no new crate.
|
|
[target.'cfg(target_vendor = "apple")'.dependencies]
|
|
rustix = { version = "1.1", default-features = false, features = ["std", "fs"] }
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|