Menu

#16 Support Offset for calculation

Next_Release
open
5
2017-03-24
2011-10-29
Giesy
No

Hi,

first thanks for the great program.

It would be really nice to have the option to provide an offset for checksum computation. So the checksum is not computed for the whole file but ignores the first n bytes.
This option could possibly combined with another option that specifies the number of bytes to be processed, so that an arbitrary part of the file is processed.

Discussion

  • Johann N. Löfflmann

    • labels: 645713 --> Interface Improvements
    • milestone: --> Next_Release
    • assigned_to: nobody --> jonelo
     
  • Johann N. Löfflmann

    thank you giesy, your feature request sounds interesting. I think it could save time to check whether two large files of the same size are different. Do you have a special use case in mind?

     
  • Giesy

    Giesy - 2011-11-09

    The use case I had recently was some files with header information, and I wanted to compute a checksum only on the content of that files. The files were binary so simply editing the files to remove the header was laborious so I figured the idea with the offset would be great.

    Other cases I could imagine are files consisting of data chunks and you want to compare only single chunks (therefore the option to specify the number of bytes considered in computing the checksum)

     
  • Rebecca G. Bettencourt

    I would also find this option useful. I need to verify a ROM dump which is split into 8 segments, each with a header containing a checksum. If I had the option to specify, say, -b for the beginning offset and -n for the number of bytes, I could easily do something like this:

    java -jar jacksum.jar -a sum32 -X -b hex:0008000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:0808000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:1008000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:1808000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:2008000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:2808000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:3008000 -n hex:7F8000 rom.bin
    java -jar jacksum.jar -a sum32 -X -b hex:3808000 -n hex:7F8000 rom.bin

    and be done. :)

     

Log in to post a comment.