Timeline for How to DEFLATE with a command line tool to extract a git object?
Current License: CC BY-SA 2.5
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 5, 2010 at 12:09 | comment | added | Marc van Kempen | NB I just tried it and zpipe.c works on git objects, compile with 'gcc -o zpipe zpipe.c -I/path/to/zlib.h -L/path/to/zlib -lz' use: ./zpipe -d < .git/objects/83/535d1693580f04824a2ddd22bd241fd00533d8 (use -d for decompression) | |
Jul 5, 2010 at 10:20 | comment | added | Marc van Kempen | Ah ok, so the data is compressed using the zlib library, then it stands to reason you can uncompress using zlib too! You could try a ruby, perl or other binding to wip up a simple deflate script. Or if you're not afraid to try your hands at compiling a c program, try this: zlib.net/zlib_how.html | |
Jul 5, 2010 at 10:07 | comment | added | Felix Geisendörfer | See the bottom of this page: progit.org/book/ch9-2.html Gzip does implement DEFLATE, but it doesn't seem like you can directly apply the algorithm. Gzip expects the data to be in gzip format (which adds a bunch of headers & stuff around the DEFLATE'ed data). (I just edited my post to include the output from gunzip) | |
Jul 5, 2010 at 10:01 | history | answered | Marc van Kempen | CC BY-SA 2.5 |