D4944: remotefilelog: rip out lz4 support (WIP)

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Oct 16 03:47:00 EDT 2018


indygreg accepted this revision as: indygreg.
indygreg added a comment.


  Get that non-standard LZ4 format outta here!
  
  Yes, we should probably add a compression engine API for doing one-shot compression/decompression. I could use that in the SQLite extension. If you don't implement it, I may do it for you in the natural course of making that extension :)
  
  I'm holding off formally accepting as a reviewer because the patch is marked WIP.
  
  Please resubmit without that.
  
  I'll need to take a pass over the final version of this code before committing. But I'm pretty sure the current state of this series is good enough or pretty close to being landable.

INLINE COMMENTS

> datapack.py:303-304
>  
> -            # it has to be at least long enough for the lz4 header.
> -            assert deltalen >= 4
> -
> -            # python-lz4 stores the length of the uncompressed field as a
> -            # little-endian 32-bit integer at the start of the data.
> -            uncompressedlen = struct.unpack('<I', data[offset:offset + 4])[0]
> +            # TODO(augie): we should store a header that is the
> +            # uncompressed size.
> +            uncompressedlen = len(zlib.decompress(

Yes we should. But this is no worse than revlogs.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4944

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list