diff options
author | Dave Rodgman <dave.rodgman@arm.com> | 2019-03-07 16:30:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 18:32:03 -0800 |
commit | 45ec975efb527625629d123f30597673889f52ca (patch) | |
tree | 38ea802c92b6430e1fdc8686589fcad3d85e740a /Documentation/lzo.txt | |
parent | 5ee4014af99f77dac89e01961b717d13ff1a8ea5 (diff) |
lib/lzo: separate lzo-rle from lzo
To prevent any issues with persistent data, separate lzo-rle from lzo so
that it is treated as a separate algorithm, and lzo is still available.
Link: http://lkml.kernel.org/r/20190205155944.16007-3-dave.rodgman@arm.com
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Cc: Matt Sealey <matt.sealey@arm.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <nitingupta910@gmail.com>
Cc: Richard Purdie <rpurdie@openedhand.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sonny Rao <sonnyrao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/lzo.txt')
-rw-r--r-- | Documentation/lzo.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/lzo.txt b/Documentation/lzo.txt index 306c60344ca7..f79934225d8d 100644 --- a/Documentation/lzo.txt +++ b/Documentation/lzo.txt @@ -88,6 +88,10 @@ length encoding. This improves speed for data with many zeros, which is a common case for zram. This modifies the bitstream in a backwards compatible way (v1 can correctly decompress v0 compressed data, but v0 cannot read v1 data). +For maximum compatibility, both versions are available under different names +(lzo and lzo-rle). Differences in the encoding are noted in this document with +e.g.: version 1 only. + Byte sequences ============== @@ -99,8 +103,8 @@ Byte sequences invalid at this place. 17 : bitstream version. If the first byte is 17, the next byte - gives the bitstream version. If the first byte is not 17, - the bitstream version is 0. + gives the bitstream version (version 1 only). If the first byte + is not 17, the bitstream version is 0. 18..21 : copy 0..3 literals state = (byte - 17) = 0..3 [ copy <state> literals ] @@ -154,8 +158,8 @@ Byte sequences state = S (copy S literals after this block) End of stream is reached if distance == 16384 - In version 1, this instruction is also used to encode a run of zeros if - distance = 0xbfff, i.e. H = 1 and the D bits are all 1. + In version 1 only, this instruction is also used to encode a run of + zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1. In this case, it is followed by a fourth byte, X. run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4. |