Commit graph

2 commits

Author SHA1 Message Date
jedarden
6d59706cc4 docs(pdftract-6bxw): add ObjStm parser verification note
Add comprehensive verification note documenting that the ObjStm parser
implementation is complete and all acceptance criteria are met.

All 16 unit tests pass, covering:
- N=10 object parsing (critical test)
- /Extends chain handling
- Circular reference detection
- Truncated ObjStm recovery
- Decompression bomb protection
- Cache hit verification (Arc::ptr_eq)
- Missing key errors
- Embedded stream rejection
- Depth limit enforcement

Refs: pdftract-6bxw
2026-05-22 15:00:32 -04:00
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