pdftract/crates/pdftract-core/src
jedarden 13e815e40c feat(pdftract-6bxw): implement object stream (ObjStm) parser
Implement the parser for PDF 1.5+ object streams with:
- Decompression via Phase 1.5 stream decoder
- Arc<RwLock<HashMap>> caching for thread-safe access
- /Extends chain support with cycle detection
- Depth limit (MAX_EXTENDS_DEPTH = 16) for adversarial protection
- get_object() API for xref type-2 entry resolution

Acceptance criteria verified:
- Critical test: N=10 objects all dereference correctly
- /Extends chain: both ObjStms' objects dereference correctly
- Cyclic /Extends: emits STRUCT_CIRCULAR_REF
- Truncated ObjStm: partial objects + diagnostic
- Decompression bomb: emits STREAM_BOMB
- Cache hit: returns cached Arc (Arc::ptr_eq verified)

Unit tests: 12 tests covering all acceptance criteria and edge cases.

Refs: pdftract-6bxw, plan Phase 1.2 line 1072
2026-05-20 19:03:53 -04:00
..
fingerprint fix(pdftract-core): remove apostrophe from test function name 2026-05-20 18:44:55 -04:00
parser feat(pdftract-6bxw): implement object stream (ObjStm) parser 2026-05-20 19:03:53 -04:00
diagnostics.rs docs(pdftract-49f8): establish Cargo.lock policy and documentation 2026-05-20 18:13:14 -04:00
lib.rs feat(pdftract-q15sh): implement v1 fingerprint algorithm 2026-05-18 01:02:30 -04:00