• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OSSystems / compress-tools-rs / 24838989502

23 Apr 2026 01:48PM UTC coverage: 78.373% (+0.5%) from 77.836%
24838989502

Pull #163

github

otavio
feat: expose ArchiveIteratorBuilder::mtree_format opt-out

libarchive's mtree format handler is permissive — it matches free-form text such as a
plain gunzip'd text file and yields bogus entries for input that isn't really an mtree
specification. The default behavior preserves libarchive's output (including on the raw
entry points), but strict callers iterating with ArchiveIterator may want to reject the
match instead of acting on the invalid entries.

- Add ArchiveIteratorBuilder::mtree_format(bool); default true preserves libarchive's
  permissive behavior, false rejects entries whose archive_format base mask indicates
  ARCHIVE_FORMAT_MTREE
- Gate the rejection inside ArchiveIterator::unsafe_next_header on the new flag,
  delegating to a module-private reject_mtree_format helper only when the caller opted
  out
- Expose archive_format plus ARCHIVE_FORMAT_BASE_MASK / ARCHIVE_FORMAT_MTREE through the
  FFI bindings and generate-ffi script so the rejection can consult libarchive's format
  code
- Extend CHANGES.md and the crate-level docs to describe the iterator-only opt-out
- Add an integration test that feeds tests/fixtures/file.txt.gz through the iterator
  with mtree_format(false) and asserts that the surface errors out
Pull Request #163: Reject non-archive inputs on archive entry points (#77)

86 of 94 new or added lines in 2 files covered. (91.49%)

1 existing line in 1 file now uncovered.

2004 of 2557 relevant lines covered (78.37%)

88.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.46
/src/iterator.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc