Given: A generic binary file and a block size
Desired output: A copy of the binary file where all the blocks that contain only Zero-Bits/Bytes have been removed/stripped from the file
I really wonder why I cannot find a tool that does this simple job. I created a small script, but its performance is ridiculous. There must be an existing software able to do this, isn't there?!
Maybe the issue with finding this is caused by the fact that there are so many terms that can be used to express this need...
Edit: The sed thread you mentions replaces every byte, I just want to replace 0-bytes if there are at least blocksize many in a row.
I want to investigate a very large very sparse file (not sparse as in sparse file in the file system) and for this analysis I want to cut out irrelevant parts
EDIT 2: The file size is in the order of 10 to 1000 GB. For small sizes, my slow own tool is alright, but for such larger files ...