Interface CompressionFactory.LongEncodingWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flush()
      Flush the unwritten content to the current output.
      int getBlockSize​(int bytesPerBlock)
      Get the number of values that can be encoded into each block for the given block size in bytes
      int getNumBytes​(int values)
      Get the number of bytes required to encoding the given number of values
      int metaSize()  
      void putMeta​(ByteBuffer metaOut, CompressionStrategy strategy)
      Output the header values of the associating encoding format to the given outputStream.
      void setBuffer​(ByteBuffer buffer)
      Data will be written starting from current position of the buffer, and the position of the buffer will be updated as content is written.
      void setOutputStream​(WriteOutBytes output)  
      void write​(long value)  
    • Method Detail

      • setBuffer

        void setBuffer​(ByteBuffer buffer)
        Data will be written starting from current position of the buffer, and the position of the buffer will be updated as content is written.
      • setOutputStream

        void setOutputStream​(WriteOutBytes output)
      • flush

        void flush()
            throws IOException
        Flush the unwritten content to the current output.
        Throws:
        IOException
      • putMeta

        void putMeta​(ByteBuffer metaOut,
                     CompressionStrategy strategy)
        Output the header values of the associating encoding format to the given outputStream. The header also include bytes for compression strategy and encoding format(optional) as described above in Compression Storage Format.
      • metaSize

        int metaSize()
      • getBlockSize

        int getBlockSize​(int bytesPerBlock)
        Get the number of values that can be encoded into each block for the given block size in bytes
      • getNumBytes

        int getNumBytes​(int values)
        Get the number of bytes required to encoding the given number of values