2003-08-24 18:36:07 +08:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS cabinet manager
|
2015-09-29 01:31:37 +08:00
|
|
|
* FILE: tools/cabman/raw.cxx
|
2003-08-24 18:36:07 +08:00
|
|
|
* PURPOSE: CAB codec for uncompressed "raw" data
|
|
|
|
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
2007-05-05 06:21:55 +08:00
|
|
|
* Colin Finck <mail@colinfinck.de>
|
2003-08-24 18:36:07 +08:00
|
|
|
* REVISIONS:
|
|
|
|
* CSH 21/03-2001 Created
|
|
|
|
* CSH 15/08-2003 Made it portable
|
2007-05-27 18:26:43 +08:00
|
|
|
* CF 04/05-2007 Made it compatible with 64-bit operating systems
|
2003-08-24 18:36:07 +08:00
|
|
|
*/
|
|
|
|
#include "raw.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* CRawCodec */
|
|
|
|
|
|
|
|
CRawCodec::CRawCodec()
|
|
|
|
/*
|
|
|
|
* FUNCTION: Default constructor
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CRawCodec::~CRawCodec()
|
|
|
|
/*
|
|
|
|
* FUNCTION: Default destructor
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-18 21:08:58 +08:00
|
|
|
ULONG CRawCodec::Compress(void* OutputBuffer,
|
|
|
|
void* InputBuffer,
|
|
|
|
ULONG InputLength,
|
|
|
|
PULONG OutputLength)
|
2003-08-24 18:36:07 +08:00
|
|
|
/*
|
|
|
|
* FUNCTION: Compresses data in a buffer
|
|
|
|
* ARGUMENTS:
|
|
|
|
* OutputBuffer = Pointer to buffer to place compressed data
|
|
|
|
* InputBuffer = Pointer to buffer with data to be compressed
|
|
|
|
* InputLength = Length of input buffer
|
|
|
|
* OutputLength = Address of buffer to place size of compressed data
|
|
|
|
*/
|
|
|
|
{
|
2008-02-02 19:57:16 +08:00
|
|
|
memcpy(OutputBuffer, InputBuffer, InputLength);
|
|
|
|
*OutputLength = InputLength;
|
|
|
|
return CS_SUCCESS;
|
2003-08-24 18:36:07 +08:00
|
|
|
}
|
|
|
|
|
2007-08-18 21:08:58 +08:00
|
|
|
ULONG CRawCodec::Uncompress(void* OutputBuffer,
|
|
|
|
void* InputBuffer,
|
|
|
|
ULONG InputLength,
|
|
|
|
PULONG OutputLength)
|
2003-08-24 18:36:07 +08:00
|
|
|
/*
|
|
|
|
* FUNCTION: Uncompresses data in a buffer
|
|
|
|
* ARGUMENTS:
|
|
|
|
* OutputBuffer = Pointer to buffer to place uncompressed data
|
|
|
|
* InputBuffer = Pointer to buffer with data to be uncompressed
|
|
|
|
* InputLength = Length of input buffer
|
|
|
|
* OutputLength = Address of buffer to place size of uncompressed data
|
|
|
|
*/
|
|
|
|
{
|
2008-02-02 19:57:16 +08:00
|
|
|
memcpy(OutputBuffer, InputBuffer, InputLength);
|
|
|
|
*OutputLength = InputLength;
|
|
|
|
return CS_SUCCESS;
|
2003-08-24 18:36:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|