public DecmpfsHeader getDecmpfsHeader(FSFile file) throws IOException {

		if ( root == null ) {
			return null;
		}

		if ( map.get( file ) != null ) {
			return map.get( file );
		}

		int fileID = getFileID( file );

		if ( fileID == -1 ) {
			return null;
		}

        for ( BTreeNodeDescriptor node : root.getNodes() ) {
			for ( BTreeNodeRecord record : node.getRecords() ) {
				if ( record.getFileID() == fileID ) {
					DecmpfsHeader header = record.getDecmpfsHeader();
					if ( header != null ) {
						map.put( file, header );
						return header;
					}
				}
			}
        }
        return null;
	}
This code will extract the attributes file from the HFS+ file system,
which contains the B-tree for traversing the DECOMPFS files.
GPL/DMG/src/dmg/java/mobiledevices/dmg/hfsplus/AttributesFileParser.java