Re: removing the header from a gzip'd string

2006-12-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Essentially, they note that the NCD does not always bevave like a > metric and one reason they put forward is that this may be due to the > size of the header portion (they were using the command line gzip and > bzip2 programs) compared to the strings being compressed (w

Re: removing the header from a gzip'd string

2006-12-23 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Actually I was implementing the use of the normalized compression > distance to evaluate molecular similarity as described in an > article in J.Chem.Inf.Model (http://dx.doi.org/10.1021/ci600384z, > subscriber access only, unfortunately). Interesting. Thanks for the rep

Re: removing the header from a gzip'd string

2006-12-23 Thread debarchana . ghosh
Bjoern Schliessmann wrote: > Rajarshi wrote: > > > Does anybody know how I can remove the header portion of the > > compressed bytes, such that I only have the compressed data > > remaining? (Obviously I do not intend to perform the > > decompression!) > > Just curious: What's your goal? :) A home

Re: removing the header from a gzip'd string

2006-12-22 Thread Gabriel Genellina
Fredrik Lundh ha escrito: > Gabriel Genellina wrote: > > > If you want to encrypt a compressed text, you must remove redundant > > information first. > > encryption? didn't the OP say that he *didn't* plan to decompress the > resulting data stream? I was trying to imagine any motivation for aski

Re: removing the header from a gzip'd string

2006-12-22 Thread vasudevram
Fredrik Lundh wrote: > Gabriel Genellina wrote: > > > Using the default options ("deflate", default compression level, no > > custom dictionary) will make those first two bytes 0x78 0x9c. > > > > If you want to encrypt a compressed text, you must remove redundant > > information first. > > encr

Re: removing the header from a gzip'd string

2006-12-21 Thread Fredrik Lundh
Gabriel Genellina wrote: > Using the default options ("deflate", default compression level, no > custom dictionary) will make those first two bytes 0x78 0x9c. > > If you want to encrypt a compressed text, you must remove redundant > information first. encryption? didn't the OP say that he *d

Re: removing the header from a gzip'd string

2006-12-21 Thread Gabriel Genellina
At Thursday 21/12/2006 18:32, Fredrik Lundh wrote: > Hi, I have some code that takes a string and obtains a compressed > version using zlib.compress > > Does anybody know how I can remove the header portion of the compressed > bytes, such that I only have the compressed data remaining? what mak

Re: removing the header from a gzip'd string

2006-12-21 Thread Bjoern Schliessmann
Rajarshi wrote: > Does anybody know how I can remove the header portion of the > compressed bytes, such that I only have the compressed data > remaining? (Obviously I do not intend to perform the > decompression!) Just curious: What's your goal? :) A home made hash function? Regards, Björn --

Re: removing the header from a gzip'd string

2006-12-21 Thread Fredrik Lundh
Rajarshi wrote: > Hi, I have some code that takes a string and obtains a compressed > version using zlib.compress > > Does anybody know how I can remove the header portion of the compressed > bytes, such that I only have the compressed data remaining? what makes you think there's a "header porti

removing the header from a gzip'd string

2006-12-21 Thread Rajarshi
Hi, I have some code that takes a string and obtains a compressed version using zlib.compress Does anybody know how I can remove the header portion of the compressed bytes, such that I only have the compressed data remaining? (Obviously I do not intend to perform the decompression!) Thanks, --