aboutsummaryrefslogtreecommitdiff
path: root/PACKER.H
diff options
context:
space:
mode:
Diffstat (limited to 'PACKER.H')
-rw-r--r--PACKER.H36
1 files changed, 36 insertions, 0 deletions
diff --git a/PACKER.H b/PACKER.H
new file mode 100644
index 0000000..41dd404
--- /dev/null
+++ b/PACKER.H
@@ -0,0 +1,36 @@
+#ifndef PACKER_H
+#define PACKER_H
+/*----------------------------------------------------------------------*/
+/* PACKER.H typedefs for Data-Compresser. 8/30/85 */
+/*----------------------------------------------------------------------*/
+#ifndef EXEC_TYPES_H
+#include "exec/types.h"
+#endif
+
+typedef enum {cmpNone = 0, cmpByteRun1 = 1} _Compression;
+typedef UBYTE Compression;
+ /* Choice of compression algorithm applied to the rows of all */
+ /* source and mask planes. "cmpByteRun1" is the byte run encoding */
+ /* generated by Mac's PackBits. Do not compress across rows! */
+
+/* Converts data to packed format "cmpByteRun1".*/
+extern LONG Packer(BYTE *, BYTE *, LONG, LONG);
+ /* source, destination, size in bytes, row size */
+ /* RETURNs packed size in bytes */
+ /* Assumes buffer is same size as source. In theory, could
+ get a data pattern that expands rather than compressing.
+ Will run off the end of your buffer in that case.*/
+
+/* Given POINTERS TO POINTERS, packs one row, updating the source and
+ destination pointers. */
+extern PackRow(BYTE **, BYTE **, LONG);
+ /* pSource, pDest, rowSize */
+
+/* Unpacks from format "cmpByteRun1".*/
+extern LONG Unpacker(BYTE *, BYTE *, LONG, LONG);
+ /* source, destination, packedSize, bufferLimit */
+ /* RETURNs actual unpacked size */
+ /* If reachs buffer's end, stops there and returns its
+ size as "unpacked size". */
+
+#endif