HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfHuf.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright (c) Contributors to the OpenEXR Project.
4 //
5 
6 
7 #ifndef INCLUDED_IMF_HUF_H
8 #define INCLUDED_IMF_HUF_H
9 
10 #include "ImfExport.h"
11 #include "ImfNamespace.h"
12 
13 //-----------------------------------------------------------------------------
14 //
15 // 16-bit Huffman compression and decompression:
16 //
17 // hufCompress (r, nr, c)
18 //
19 // Compresses the contents of array r (of length nr),
20 // stores the compressed data in array c, and returns
21 // the size of the compressed data (in bytes).
22 //
23 // To avoid buffer overflows, the size of array c should
24 // be at least 2 * nr + 65536.
25 //
26 // hufUncompress (c, nc, r, nr)
27 //
28 // Uncompresses the data in array c (with length nc),
29 // and stores the results in array r (with length nr).
30 //
31 //-----------------------------------------------------------------------------
32 
34 
35 
37 int
38 hufCompress (const unsigned short raw[/*nRaw*/],
39  int nRaw,
40  char compressed[/*2 * nRaw + 65536*/]);
41 
43 void
44 hufUncompress (const char compressed[/*nCompressed*/],
45  int nCompressed,
46  unsigned short raw[/*nRaw*/],
47  int nRaw);
48 
49 
51 
52 #endif
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int hufCompress(const unsigned short raw[], int nRaw, char compressed[])
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:80
IMF_EXPORT void hufUncompress(const char compressed[], int nCompressed, unsigned short raw[], int nRaw)
#define IMF_EXPORT
Definition: ImfExport.h:54
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:79