Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class LZ4

    LZ4 compression and decompression routines.

    http://code.google.com/p/lz4/ http://fastcompression.blogspot.fr/p/lz4.html
    Inheritance
    object
    LZ4
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Codecs.Compressing
    Assembly: Lucene.Net.dll
    Syntax
    public static class LZ4

    Methods

    Compress(byte[], int, int, DataOutput, HashTable)

    Compress bytes[off:off+len] into out using at most 16KB of memory. ht shouldn't be shared across threads but can safely be reused.

    Declaration
    public static void Compress(byte[] bytes, int off, int len, DataOutput @out, LZ4.HashTable ht)
    Parameters
    Type Name Description
    byte[] bytes
    int off
    int len
    DataOutput out
    LZ4.HashTable ht

    CompressHC(byte[], int, int, DataOutput, HCHashTable)

    Compress bytes[off:off+len] into out. Compared to Compress(byte[], int, int, DataOutput, HashTable), this method is slower and uses more memory (~ 256KB per thread) but should provide better compression ratios (especially on large inputs) because it chooses the best match among up to 256 candidates and then performs trade-offs to fix overlapping matches. ht shouldn't be shared across threads but can safely be reused.

    Declaration
    public static void CompressHC(byte[] src, int srcOff, int srcLen, DataOutput @out, LZ4.HCHashTable ht)
    Parameters
    Type Name Description
    byte[] src
    int srcOff
    int srcLen
    DataOutput out
    LZ4.HCHashTable ht

    Decompress(DataInput, int, byte[], int)

    Decompress at least decompressedLen bytes into dest[dOff]. Please note that dest must be large enough to be able to hold all decompressed data (meaning that you need to know the total decompressed length).

    Declaration
    public static int Decompress(DataInput compressed, int decompressedLen, byte[] dest, int dOff)
    Parameters
    Type Name Description
    DataInput compressed
    int decompressedLen
    byte[] dest
    int dOff
    Returns
    Type Description
    int
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.