MMIOM_COMPRESS
Appearance
The MMIOM_COMPRESS message is sent to a Multimedia I/O (MMIO) procedure to request that raw, uncompressed data residing in a buffer be compressed using a specified codec or compression configuration.
Syntax
rc = mmioSendMessage(hmmio, MMIOM_COMPRESS, (LONG)pMMCompress, lParam2);
Parameters
- pmmioinfo (PMMIOINFO)
- A pointer to an MMIOINFO data structure maintaining the current state of the open file.
- usMsg (USHORT)
- The message identifier, set to `MMIOM_COMPRESS`.
- lParam1 (LONG)
- A pointer to an MMCOMPRESS structure detailing the source buffer, destination buffer, and compression parameters.
- lParam2 (LONG)
- This parameter is not used.
Return Value
- rc (ULONG)
- Return codes indicating success or the type of failure:
- MMIO_SUCCESS: The data in the buffer was compressed successfully.
- MMIO_ERROR: An error occurred during the compression sequence, and the output layout is invalid.
Remarks
- **Data Processing**: This message targets memory buffers directly. The I/O procedure reads the raw data specified within the MMCOMPRESS block and executes its codec algorithm to emit compressed packets.
- **Documentation Typo**: Note that while the original OS/2 reference manual text erroneously describes `MMIO_SUCCESS` as "The data is decompressed successfully", this message is explicitly used to perform **compression**. For the reverse operation, see MMIOM_DECOMPRESS.
- **Codec Responsibility**: Custom digital audio or video I/O procedures handling complex container formats (such as AVI or movie wrappers) implement this to provide hardware or software codec acceleration right inside the file-write stream layer.