|
|
|
|
|
by doubloon
832 days ago
|
|
how do i build it? edit. ok 10 minutes later if have persuaded automake/conf/etc to create a makefile. now xxhash wont compile because src/bef.c:278:2: error: unknown type name ‘XXH128_hash_t’; did you mean ‘XXH32_hash_t’? edit ok many more minutes later i purged ubuntu xxhash and installed my own copy and re-negotiatied with automake/conf/etc edit lol downvoted for asking how to build. edit ok now that its built, havent the foggiest how to use it. no example or hello world is given in readme. edit nevermind figured it out. ./bef -c -i bef -o bef.test edit so i still dont understand it. i bef'ed the Makefile, removed a character, tried to 'deconstruct' it, the output is zero bytes |
|
I can't reproduce this. These are the commands I used, with it freshly compiled on a ubuntu docker container, both the v0.1 release and the master tree.
./bef -c -i Makefile -o Makefile.bef
dd if=/dev/zero of=Makefile.bef bs=1 oseek=300 count=1
./bef -d -i Makefile.bef -o Makefile2
cmp Makefile Makefile2 || echo "failed!"
edit: oh, I see, you 'removed a character'. Depending on what character you removed or corrupted from the output, you could've either hit the issue described above with inserting noise, but this time removing information, or you caused corruption in the header by either corrupting the magic number, hash type, or hash itself. The command line utility automatically truncates the output before calling the deconstruct function. The header is sadly the biggest single point of failure in the tool/format, which is why I introduced the --raw flag for those who don't want it.