src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
/**
     * Get a chunk of compressed data (offset, length) corresponding to given position
     *
     * @param position Position in the file.
     * @return pair of chunk offset and length.
     * @throws java.io.IOException on any I/O error.
     */
Get a chunk of compressed data (offset, length) corresponding to given position
@param position Position in the file.
@return pair of chunk offset and length.
@throws java.io.IOException on any I/O error.
Get a chunk of compressed data ( offset length ) corresponding to given position @param position Position in the file . @return pair of chunk offset and length . @throws java . io . IOException on any I / O error .
public Chunk chunkFor(long position) throws IOException
    {
        int idx = (int) (position / parameters.chunkLength());
        if (idx >= chunkOffsets.size)
            throw new EOFException();
        long chunkOffset = chunkOffsets.get(idx);
        long nextChunkOffset = (idx + 1 == chunkOffsets.size)
                                ? compressedFileLength
                                : chunkOffsets.get(idx + 1);
        return new Chunk(chunkOffset, (int) (nextChunkOffset - chunkOffset - 4)); 
    }
public Chunk chunkFor ( long position ) throws IOException { int idx = ( int ) ( position / parameters . chunkLength ( ) ) ; if ( idx >= chunkOffsets . size ) throw new EOFException ( ) ; long chunkOffset = chunkOffsets . get ( idx ) ; long nextChunkOffset = ( idx + 1 == chunkOffsets . size ) ? compressedFileLength : chunkOffsets . get ( idx + 1 ) ; return new Chunk ( chunkOffset , ( int ) ( nextChunkOffset - chunkOffset - 4 ) ) ; }
Get a chunk of compressed data (offset, length) corresponding to given position
 @param position Position in the file.
Get a chunk of compressed data ( offset length ) corresponding to given position @param position Position in the file .
// position of the chunk // "4" bytes reserved for checksum