pngmeta
Low-level PNG tEXt chunk reader/writer. No image decoding — operates directly on binary PNG structure using only std + memchr.
Features
- Read — extract all tEXt chunks as
BTreeMap<String, String> - Scan — streaming predicate search with early exit (no allocation per chunk)
- Contains — SIMD-accelerated (
memchr::memmem) binary pattern search - Write — insert tEXt chunks before IEND with correct CRC-32
Usage
use Path;
use ;
// Read all tEXt chunks
let chunks = read_text_chunks?;
for in &chunks
// Fast binary search (no UTF-8 decoding)
if contains_in_text_chunks?
// Write a tEXt chunk
write_text_chunk?;
Feature Flags
| Flag | Description |
|---|---|
test-util |
Expose test_util::make_test_png helper for downstream test code |
License
MIT