public ZoomDataBlock(int zoomLevel, SeekableStream fis, RPTreeLeafNodeItem leafHitItem,
                         HashMap<Integer, String> chromosomeMap, boolean isLowToHigh, int uncompressBufSize) {

        this.zoomLevel = zoomLevel;
        this.leafHitItem = leafHitItem;
        this.chromosomeMap = chromosomeMap;
        this.isLowToHigh = isLowToHigh;

        fileOffset = this.leafHitItem.getDataOffset();
        dataBlockSize = this.leafHitItem.geDataSize();
        byte[] buffer = new byte[(int) dataBlockSize];

        // read Bed data block into a buffer
        try {
            fis.seek(fileOffset);
            fis.readFully(buffer);

            // decompress if necessary - the buffer size is 0 for uncomressed data
            // Note:  BBFile Table C specifies a decompression buffer size
            if (uncompressBufSize > 0)
                zoomBuffer = BBCompressionUtils.decompress(buffer, uncompressBufSize);
            else
                zoomBuffer = buffer;    // use uncompressed read buffer directly

        } catch (IOException ex) {
            log.error("Error reading Zoom level " + this.zoomLevel + " data for leaf item ",  ex);
            String error = String.format("Error reading zoom level %d data for leaf item %d\n", this.zoomLevel);
            throw new RuntimeException(error, ex);
        }

        // wrap the bed buffer as an input stream
        if (this.isLowToHigh)
            lbdis = new LittleEndianInputStream(new ByteArrayInputStream(zoomBuffer));
        else
            dis = new DataInputStream(new ByteArrayInputStream(zoomBuffer));

        // initialize unread data size
        remDataSize = zoomBuffer.length;

        // use method getZoomData to extract block data
    }