Commit 5bc4e1d
feat(handler): add support for BTRFS stream
Instead of relying on an external CRC32C package, I implemented the algorithm directly in Python.
This manual implementation was necessary because existing libraries lacked the flexibility to support the specific requirement used by BTRFS stream.
The checksum uses the Castagnoli reflected polynomial with a seed of 0x0 and no final XOR operation.
crc32c and crcmod wasn't able to fullfill those requirements and calculate the right checksum.1 parent 8e0e8bd commit 5bc4e1d
42 files changed
Lines changed: 731 additions & 0 deletions
File tree
- docs
- python/unblob/handlers
- filesystem
- tests/integration/filesystem/btrfs_stream
- __input__
- __output__
- sample.v1.none.bin_extract
- 16-5254007.btrfs_stream_extract
- data_samples
- subdir
- sample.v2.lzo.bin_extract
- 16-168051.btrfs_stream_extract
- sample.v2.none.bin_extract
- 16-5250324.btrfs_stream_extract
- data_samples
- subdir
- sample.v2.zlib.bin_extract
- 16-168095.btrfs_stream_extract
- sample.v2.zstd.bin_extract
- 16-168095.btrfs_stream_extract
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
206 | 227 | | |
207 | 228 | | |
208 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
0 commit comments