Eric Biggers wrote: > On Sun, Aug 10, 2014 at 04:51:44PM +0200, Jean-Pierre André wrote: >> I gather the crc polynomial you propose has proved >> efficient in other compression algorithm, and is >> supposed to be stable. Then a simpler way is to >> compute the table once for all, and encode it as an >> array of constants. Just comment out the encoding >> function in case someone would like to test other >> polynomials. >> > The proposed hash function is borrowed from LZMA, the algorithm used by xz. > The > CRC polynomial is standard; it's widely used for checksums (Ethernet, PNG, > zlib, > bzip2, etc.). The main consideration is how to actually use the CRC32 table > to > hash 3 bytes. A true CRC would checksum all three bytes, but the current > proposal only does a CRC on the first byte, then mixes the other two bytes > into > the hash, which is what LZMA does. > > I agree that a hard-coded table is the simplest solution if CRC32 is retained > in > the hash function. I'll post a patch for that unless I decide a different > hash > function is preferable.
For a hash modulus of (1 << 14), you can even halve the needed space by truncating to u16's. Jean-Pierre > > Eric > ------------------------------------------------------------------------------ _______________________________________________ ntfs-3g-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
