Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

agashlin/crctrunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived in favor of crc-init-trunc, it is asymptotically faster and can handle zeroes from the file start or end.


crctrunc

Check if a file could be truncated with zeroes to match a CRC32 checksum.

Usage

crctrunc file target_checksum chunk_size

Bytes are kept from the start of the file in chunks of chunk_size. All integers are hexadecimal. chunk_size can be set to 1 to try all possible truncations, but this can be slow. Usually something like 1K (400) or 64K (10000) is more appropriate.

Example

crctrunc omni.ja 326fbb3c 10000

This will check the CRC with bytes from offset 10000 to the end of the file zeroed, then from 20000, 30000, etc. (though matching is actually done backwards).

About

Check if a file could be truncated with zeroes to match a CRC32 checksum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages