public BBZoomLevelFormat(int zoomLevel, SeekableStream fis, long fileOffset,
                           long dataSize, boolean isLowToHigh, int uncompressBufSize) {

        // store file access info
        this.zoomLevel = zoomLevel;
        this.fis = fis;
        zoomFormatOffset = fileOffset;
        zoomDataSize = dataSize;
        this.isLowToHigh = isLowToHigh;

        // Note: a bad zoom data header will result in a 0 count returned
        // or an IOException

        // size of buffer is ZOOM_FORMAT_HEADER_SIZE to get the record count
        byte[] buffer = new byte[ZOOM_FORMAT_HEADER_SIZE];

        try {

            // Read zoom level data format into a buffer
            fis.seek(zoomFormatOffset);
            fis.readFully(buffer);

            // decode header - or fail
            if(this.isLowToHigh) {
                LittleEndianInputStream lbdis = new LittleEndianInputStream(new ByteArrayInputStream(buffer));
                zoomRecordCount = lbdis.readInt();
            }
            else {
                DataInputStream bdis = new DataInputStream(new ByteArrayInputStream(buffer));
                zoomRecordCount = bdis.readInt();
            }

        } catch (IOException ex) {
            log.error("Error reading zoom level data records (Table O) ", ex);
            throw new RuntimeException("Error reading zoom level data records (Table O)", ex);
            }

        // integrity check - should be > 0 or less than a max like 100M records?
            // Note: if trouble reading zoom data records, readAllZoomLevelRecords returns 0
            if(zoomRecordCount < 0 || zoomRecordCount > MAX_ZOOM_DATA_RECORDS)
                return;  // terminate if bad zoom level data encountered

            // Position file offset past the current zoom level header to pick up
            // the zoom data records which immediately follow.
            zoomDataOffset = zoomFormatOffset + ZOOM_FORMAT_HEADER_SIZE;

            // calculate the position of the R+ zoom index tree
            zoomIndexOffset = zoomDataOffset + zoomDataSize;
    }