Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class CompressionTools

    Simple utility class providing static methods to compress and decompress binary data for stored fields. this class uses the DeflateStream class to compress and decompress.

    Inheritance
    object
    CompressionTools
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Documents
    Assembly: Lucene.Net.dll
    Syntax
    public static class CompressionTools

    Methods

    Compress(byte[])

    Compresses all bytes in the array, with default Optimal level

    Declaration
    public static byte[] Compress(byte[] value)
    Parameters
    Type Name Description
    byte[] value
    Returns
    Type Description
    byte[]

    Compress(byte[], int, int)

    Compresses the specified byte range, with default Optimal level

    Declaration
    public static byte[] Compress(byte[] value, int offset, int length)
    Parameters
    Type Name Description
    byte[] value
    int offset
    int length
    Returns
    Type Description
    byte[]

    Compress(byte[], int, int, CompressionLevel)

    Compresses the specified byte range using the specified compressionLevel.

    Declaration
    public static byte[] Compress(byte[] value, int offset, int length, CompressionLevel compressionLevel)
    Parameters
    Type Name Description
    byte[] value
    int offset
    int length
    CompressionLevel compressionLevel
    Returns
    Type Description
    byte[]

    CompressString(string)

    Compresses the string value, with default Optimal level

    Declaration
    public static byte[] CompressString(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    byte[]

    CompressString(string, CompressionLevel)

    Compresses the string value using the specified compressionLevel.

    Declaration
    public static byte[] CompressString(string value, CompressionLevel compressionLevel)
    Parameters
    Type Name Description
    string value
    CompressionLevel compressionLevel
    Returns
    Type Description
    byte[]

    Decompress(BytesRef)

    Decompress the byte array previously returned by compress (referenced by the provided BytesRef)

    Declaration
    public static byte[] Decompress(BytesRef bytes)
    Parameters
    Type Name Description
    BytesRef bytes
    Returns
    Type Description
    byte[]

    Decompress(byte[])

    Decompress the byte array previously returned by compress

    Declaration
    public static byte[] Decompress(byte[] value)
    Parameters
    Type Name Description
    byte[] value
    Returns
    Type Description
    byte[]

    Decompress(byte[], int, int)

    Decompress the byte array previously returned by compress

    Declaration
    public static byte[] Decompress(byte[] value, int offset, int length)
    Parameters
    Type Name Description
    byte[] value
    int offset
    int length
    Returns
    Type Description
    byte[]

    DecompressString(BytesRef)

    Decompress the byte array (referenced by the provided BytesRef) previously returned by CompressString(string) back into a string

    Declaration
    public static string DecompressString(BytesRef bytes)
    Parameters
    Type Name Description
    BytesRef bytes
    Returns
    Type Description
    string

    DecompressString(byte[])

    Decompress the byte array previously returned by CompressString(string) back into a string

    Declaration
    public static string DecompressString(byte[] value)
    Parameters
    Type Name Description
    byte[] value
    Returns
    Type Description
    string

    DecompressString(byte[], int, int)

    Decompress the byte array previously returned by CompressString(string) back into a string

    Declaration
    public static string DecompressString(byte[] value, int offset, int length)
    Parameters
    Type Name Description
    byte[] value
    int offset
    int length
    Returns
    Type Description
    string
    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.