tokenfold-core 0.3.2

Token-aware compression for LLM payloads: shrink JSON tool-call bodies, command output, and diffs with exact tiktoken accounting and a typed safety report.
Documentation
[package]
name = "tokenfold-core"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Token-aware compression for LLM payloads: shrink JSON tool-call bodies, command output, and diffs with exact tiktoken accounting and a typed safety report."
keywords = ["llm", "tokenizer", "compression", "tiktoken", "openai"]
categories = ["compression", "text-processing"]

[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
regex = { workspace = true }
sha2 = { workspace = true }
toml = { workspace = true }
tiktoken-rs = { workspace = true, optional = true }

[dev-dependencies]
proptest = { workspace = true }

[features]
default = ["tiktoken"]
tiktoken = ["dep:tiktoken-rs"]

[[bench]]
name = "compression_bench"
harness = false