Class NoopDoubleCodec


  • public final class NoopDoubleCodec
    extends DoubleCodec
    • Method Detail

      • compressDouble

        public int compressDouble​(long doubleBits,
                                  byte[] out,
                                  int outPos)
        Description copied from class: DoubleCodec
        Compress the double from its bit representation and write result into out.
        Specified by:
        compressDouble in class DoubleCodec
        Parameters:
        doubleBits - the double value as converted by Double.doubleToRawLongBits(double).
        out - the output buffer where the compressed value is written to.
        outPos - at which position to write the compressed value in out.
        Returns:
        the new value of outPos (NOT the number of bytes written).
      • decompressDouble

        public int decompressDouble​(byte[] data,
                                    int pos,
                                    org.apache.commons.lang3.mutable.MutableDouble out)
        Description copied from class: DoubleCodec
        Decompress a single double from the given byte array and write the result into out.
        Specified by:
        decompressDouble in class DoubleCodec
        Parameters:
        data - the compressed data.
        pos - start reading from data at this position.
        out - output value, the result should be written using MutableDouble.doubleValue().
        Returns:
        the new value of pos after reading the compressed value.
      • compressedSize

        public int compressedSize​(byte[] data,
                                  int pos)
        Description copied from class: DoubleCodec
        Return the number of bytes used to compress the current value.
        Specified by:
        compressedSize in class DoubleCodec
        Parameters:
        data - the compressed data.
        pos - start reading from data at this position.
        Returns:
        the number of bytes that the compressed value at pos is.
      • describeCompression

        public java.lang.String describeCompression​(int type)
        Description copied from class: DoubleCodec
        Return some string description on how the data is compressed. For debugging or testing.
        Specified by:
        describeCompression in class DoubleCodec
        Parameters:
        type - a type identifier.
        Returns:
        some string for describing how the data is compressed.
      • describeCompressedValue

        public DoubleCodec.CompressionInfo describeCompressedValue​(byte[] data,
                                                                   int pos,
                                                                   double originalInput)
        Description copied from class: DoubleCodec
        Return debug info about how the current value is compressed. For debugging or testing.
        Specified by:
        describeCompressedValue in class DoubleCodec
        Parameters:
        data - the compressed data.
        pos - start reading from data at this position.
        Returns:
        info object describing the current compressed value.