Re: ANNOUNCE: SAMflate - gzip file decoder
Andrew Collier wrote: Hello all, I would like to announce immediate availability of a new program: SAMflate Great work Andrew, will have to have a play with it! Colin = Quazar : Hardware, Software, Spares and Repairs for the SAM Coupe 1995-2009 - Celebrating 15 Years of developing for the SAM Coupe Website: http://www.samcoupe.com/
Re: ANNOUNCE: SAMflate - gzip file decoder
Andrew Collier wrote: - an implementation of the inflate decompression algorithm from RFC1951, as used by gzip and other compatible utilities. Very nice! Can it be fed straight gzip file data, or does it need the file header stripping from it first? I think I usually pass everything to zlib's inflate, but it may well detect and skip it. Si
Re: ANNOUNCE: SAMflate - gzip file decoder
On 4 Feb 2009, at 08:33, Simon Owen wrote: Andrew Collier wrote: - an implementation of the inflate decompression algorithm from RFC1951, as used by gzip and other compatible utilities. Very nice! Can it be fed straight gzip file data, or does it need the file header stripping from it first? I think I usually pass everything to zlib's inflate, but it may well detect and skip it. Hi, The whole gz file. In fact I explicitly test for the gzip magic number bytes at the beginning - it's one of the few opportunities to sanity-check the input! Otherwise, a typo in your source address would be very likely to crash the machine, and I thought this was perhaps a little user-unfriendly... Cheers, Andrew PS. By the way, Sourceforge have approved the project and so the source files are now available. -- --- Andrew Collier http://www.intensity.org.uk/ --- --
Re: ANNOUNCE: SAMflate - gzip file decoder
Quoting Andrew Collier and...@intensity.org.uk: Hello all, I would like to announce immediate availability of a new program: SAMflate Excellent work Andrew!
ANNOUNCE: SAMflate - gzip file decoder
Hello all, I would like to announce immediate availability of a new program: SAMflate - an implementation of the inflate decompression algorithm from RFC1951, as used by gzip and other compatible utilities. In other words, it's like gunzip for the Sam. Note that I have not implemented the compression side - instead you use the standard gzip utility on your Mac/PC/Unix computer to compress a file, and SAMflate running on the Sam will decode it for you. You can download it here: http://www.worldofsam.org/freelinking/SAMflate Source code is also available[1], for anyone who wants to incorporate it into other programs: http://sourceforge.net/projects/samflate/ [1] At least it will be, as soon as sourceforge admins get around to approving the project (requires pyz80 for assembly, I took a few shortcuts when writing it...) Please have a go, and do let me know if you find it useful or if you have any trouble with it! I'd be especially interested if you have a file it can't decode (there may be bugs in the handling of Block Types 0 and 1 - the code isn't really tested because I couldn't persuade gzip to make that sort of file to try it with! Block Type 2 is the most efficient, and gzip seems to use it for all compression levels 1 to 9, so it's unlikely that anyone will see that problem...) Cheers, Andrew -- --- Andrew Collier http://www.intensity.org.uk/ --- --