ReactOS 0.4.16-dev-297-gc569aee
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 */
#define CS_SUCCESS
Definition: cabinet.h:41
virtual ULONG Uncompress(void *OutputBuffer, void *InputBuffer, ULONG InputLength, PULONG OutputLength) override
Definition: raw.cxx:52
virtual ~CRawCodec()
Definition: raw.cxx:26
virtual ULONG Compress(void *OutputBuffer, void *InputBuffer, ULONG InputLength, PULONG OutputLength) override
Definition: raw.cxx:34
CRawCodec()
Definition: raw.cxx:18
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953