Repairing Corrupted ZIP Files by Brute Force Scanning in C
1–10 of 28 posts
Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#2Though I recommend to read the nice post, here is the direct link to the code: http://git.zx2c4.com/BruteZip/tree/read.c
Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#3Such as that compressed archives are hard if possible at all to repair. Or, say, that the optimal encoding is a very hard problem... something that David Huffman simply didn't know when he came up with his coding algorithm.
Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#4Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#5Very cool article. If you are going to have a bunch of packed structs, though, it's often easier to wrap all the structs in #pragma pack(0)/pack() rather than putting the attribute on each member. This is an MSism, but it works in gcc.
Ideally, I guess I wouldn't read directly into a struct, though, and instead use the right functions from endian.h to make the code portable, but ah! such is life when you're scrambling to save a zip and the post-graduation nostalgia is high and the post-coffee-crash caffeination is low.
Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#6Nice to see that the fun way is the right way in this case.
Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#7Re: Repairing Corrupted ZIP Files by Brute Force Scanning in C
#8I'mn afraid your blog post is almost completely unreadable in Chrome and Opera on Windows 7.