Files
craft-libs/crates/psd/Cargo.toml
T
Dylan M. TaylorandRene Leonhardt 392b8720cd craft-psd: less copying and compression work when encoding planes (#1043)
- PackBits scans each row once; RLE planes encode their rows on worker
  threads on native targets (rayon), keeping the exact packet boundaries
  and the fallback when RLE does not pay.
- ZIP output grows in bounded blocks and is compacted to its encoded size,
  instead of reserving the raw size; native threads reuse a finished
  encoder's working buffers.
- 16/32-bit prediction works on owned buffers in one pass.
- Filter-effects planes and pattern blocks encode from borrowed rows and
  owned buffers without the intermediate copies.

The encoded bytes are unchanged.

Ported from storytold/photocraft#7797 (its crates/psd part), at
a1ee8355a4651d379286cd13f92dabe4344e295f.

Co-authored-by: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com>
2026-11-11 21:04:07 -05:00

33 lines
1.0 KiB
TOML

[package]
name = "craft-psd"
description = "Faithful, lossless reader and writer for Adobe Photoshop PSD and PSB files, and for the Photoshop resource files that share their primitives (ABR, ASL, ACO, ACT, ASE, GRD, PAT, ATN, CSH, SHC)"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
[features]
# Real-file corpus tests (opt-in). Fail when the corpus is missing.
corpus = []
default = []
serde = ["dep:serde"]
testgen = []
[dependencies]
thiserror = { workspace = true }
# zlib-rs is the backend the code was measured and byte-compared with in PhotoCraft.
flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs", "runtime_detection"] }
encoding_rs = { workspace = true }
serde = { workspace = true, optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rayon = { workspace = true }
[dev-dependencies]
proptest = { workspace = true }
craft-psd = { path = ".", features = ["testgen"] }
[lints]
workspace = true