Skip to content

Add bitmap helpers#127

Merged
Schamper merged 3 commits into
fox-it:mainfrom
JSCU-CNI:bitmap-parsing
May 21, 2026
Merged

Add bitmap helpers#127
Schamper merged 3 commits into
fox-it:mainfrom
JSCU-CNI:bitmap-parsing

Conversation

@JSCU-CNI

Copy link
Copy Markdown
Contributor

This PR adds a function to convert a bitmap of free/used space into runlists.

Filesystems such as NTFS and EXTFS record which parts of the filesystem are allocated/unallocated via bitmaps where a block on the filesystem is represented by a bit. Distinguishing which parts of the filesystem are in active use and which parts are not can be useful for things like scraping.

Comment thread dissect/util/blockbitmap.py Outdated
Comment thread dissect/util/blockbitmap.py Outdated
Comment thread dissect/util/blockbitmap.py Outdated
@JSCU-CNI

Copy link
Copy Markdown
Contributor Author

@Schamper Hopefully these changes are along the lines of what you suggested.

@Schamper Schamper changed the title Add block bitmap parser Add bitmap helpers May 19, 2026
@Schamper

Copy link
Copy Markdown
Member

I added some additional helpers, fixed some bugs and added some more tests. Let me know if these changes work for you or if you see any issues with them.

@JSCU-CNI

Copy link
Copy Markdown
Contributor Author

LGTM, feel free to merge. Do you want us to update the ntfs and extfs pr's? Feel free to push the required changes (as well as other suggestions) over those branches if you want to.

@Schamper

Copy link
Copy Markdown
Member

Do you want us to update the ntfs and extfs pr's?

If you can, that would be appreciated 😄

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (4d86c1b) to head (94916aa).

Files with missing lines Patch % Lines
dissect/util/bitmap.py 0.00% 74 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #127   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         28      29    +1     
  Lines       2029    2103   +74     
=====================================
- Misses      2029    2103   +74     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented May 21, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 10.27%

⚡ 1 improved benchmark
✅ 32 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_benchmark_lz4_decompress[python-large] 202.6 µs 183.7 µs +10.27%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing JSCU-CNI:bitmap-parsing (94916aa) with main (4d86c1b)

Open in CodSpeed

@Schamper Schamper merged commit dde4491 into fox-it:main May 21, 2026
29 of 32 checks passed
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request May 26, 2026
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request Jun 4, 2026
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants