ReactOS  0.4.14-dev-815-ge410a12
raw.cxx
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS cabinet manager
4  * FILE: tools/cabman/raw.cxx
5  * PURPOSE: CAB codec for uncompressed "raw" data
6  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7  * Colin Finck <mail@colinfinck.de>
8  * REVISIONS:
9  * CSH 21/03-2001 Created
10  * CSH 15/08-2003 Made it portable
11  * CF 04/05-2007 Made it compatible with 64-bit operating systems
12  */
13 #include "raw.h"
14 
15 
16 /* CRawCodec */
17 
19 /*
20  * FUNCTION: Default constructor
21  */
22 {
23 }
24 
25 
27 /*
28  * FUNCTION: Default destructor
29  */
30 {
31 }
32 
33 
35  void* InputBuffer,
36  ULONG InputLength,
37  PULONG OutputLength)
38 /*
39  * FUNCTION: Compresses data in a buffer
40  * ARGUMENTS:
41  * OutputBuffer = Pointer to buffer to place compressed data
42  * InputBuffer = Pointer to buffer with data to be compressed
43  * InputLength = Length of input buffer
44  * OutputLength = Address of buffer to place size of compressed data
45  */
46 {
47  memcpy(OutputBuffer, InputBuffer, InputLength);
48  *OutputLength = InputLength;
49  return CS_SUCCESS;
50 }
51 
53  void* InputBuffer,
54  ULONG InputLength,
55  PULONG OutputLength)
56 /*
57  * FUNCTION: Uncompresses data in a buffer
58  * ARGUMENTS:
59  * OutputBuffer = Pointer to buffer to place uncompressed data
60  * InputBuffer = Pointer to buffer with data to be uncompressed
61  * InputLength = Length of input buffer
62  * OutputLength = Address of buffer to place size of uncompressed data
63  */
64 {
65  memcpy(OutputBuffer, InputBuffer, InputLength);
66  *OutputLength = InputLength;
67  return CS_SUCCESS;
68 }
69 
70 /* EOF */
virtual ULONG Compress(void *OutputBuffer, void *InputBuffer, ULONG InputLength, PULONG OutputLength)
Definition: raw.cxx:34
CHAR InputBuffer[80]
Definition: conmgr.c:33
CRawCodec()
Definition: raw.cxx:18
virtual ULONG Uncompress(void *OutputBuffer, void *InputBuffer, ULONG InputLength, PULONG OutputLength)
Definition: raw.cxx:52
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
virtual ~CRawCodec()
Definition: raw.cxx:26
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1
#define CS_SUCCESS
Definition: cabinet.h:41