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 18 CRawCodec::CRawCodec() 19 /* 20 * FUNCTION: Default constructor 21 */ 22 { 23 } 24 25 26 CRawCodec::~CRawCodec() 27 /* 28 * FUNCTION: Default destructor 29 */ 30 { 31 } 32 33 34 ULONG CRawCodec::Compress(void* OutputBuffer, 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 52 ULONG CRawCodec::Uncompress(void* OutputBuffer, 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 */ 71