private File writeVolumeHeaderFile( ImplHFSXFileSystemView hfsxFileSystemView, 
										HFSPlusForkData volumeHeaderFile, 
										String volumeHeaderFileName ) throws IOException {

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

		File file = File.createTempFile( "Ghidra_" + volumeHeaderFileName + "_", ".tmp" );
		file.deleteOnExit();
		OutputStream out = new FileOutputStream( file );
		try {
			CommonHFSForkData fork = CommonHFSForkData.create( volumeHeaderFile );
			hfsxFileSystemView.extractForkToStream( fork, fork.getBasicExtents(), out, new NullProgressMonitor() {} );
		}
		finally {
			out.close();
		}
		return file;
	}
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