mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 06:22:24 +00:00
- 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>
33 lines
1.0 KiB
TOML
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
|