1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     cx_Compression.h
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Revision: 36999 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_CX_COMPRESSION_H_
17 #define NN_CX_COMPRESSION_H_
18 
19 #include <nn/types.h>
20 
21 namespace nn {
22 namespace cx {
23 
24 /* Please see man pages for details
25 
26  */
27 const int   LZ_COMPRESS_WORK_SIZE   = (4096 + 256 + 256) * sizeof(s16);
28 
29 u32 CompressLZImpl(const u8 *srcp, u32 size, u8 *dstp, void *work, bool exFormat);
30 
31 /* Please see man pages for details
32 
33 
34 */
35 
36 /* Please see man pages for details
37 
38 
39 
40 
41 
42 
43 
44  */
CompressLZ(const u8 * srcp,u32 size,u8 * dstp,void * work)45 inline u32 CompressLZ(const u8 *srcp, u32 size, u8 *dstp, void *work)
46 {
47     return CompressLZImpl( srcp, size, dstp, work, false );
48 }
CompressLZEx(const u8 * srcp,u32 size,u8 * dstp,void * work)49 inline u32 CompressLZEx(const u8 *srcp, u32 size, u8 *dstp, void* work)
50 {
51     return CompressLZImpl( srcp, size, dstp, work, true );
52 }
53 
54 /* Please see man pages for details
55 
56 
57 
58 
59 
60 
61  */
62 u32 CompressRL( const u8 *srcp, u32 size, u8 *dstp );
63 
64 /* Please see man pages for details
65 
66  */
67 const int   HUFFMAN_COMPRESS_WORK_SIZE  = 12288 + 512 + 1536;
68 
69 /* Please see man pages for details
70 
71 
72 
73 
74 
75 
76 
77 
78  */
79 u32 CompressHuffman( const u8 *srcp, u32 size, u8 *dstp, u8 huffBitSize, void *work );
80 
81 }   // namespace cx
82 }   // namespace nn
83 
84 /*
85 
86 */
87 
88 /* NN_CX_COMPRESSION_H_ */
89 #endif
90