Not sure how this will help, and assuming you don't want to get down into weeds of the actual compression algorithm used to create the chd file (hint: there are different versions supported by chdman, the MAME utility originally used, mostly likely, to create the chd files). Think of chd as another type of compression format like zip, 7z, rar, etc. A utility like chdman is used to create the file, then the end user program like MAME, and the other emulators that now support CHD, decompress the CHD file 'on the fly' directly into memory so the emulator can use it. Does any of this help?