2003-08-24 10:36:07 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS cabinet manager
|
2015-09-28 17:31:37 +00:00
|
|
|
* FILE: tools/cabman/raw.cxx
|
2003-08-24 10:36:07 +00:00
|
|
|
* PURPOSE: CAB codec for uncompressed "raw" data
|
|
|
|
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
2007-05-04 22:21:55 +00:00
|
|
|
* Colin Finck <mail@colinfinck.de>
|
2003-08-24 10:36:07 +00:00
|
|
|
* REVISIONS:
|
|
|
|
* CSH 21/03-2001 Created
|
|
|
|
* CSH 15/08-2003 Made it portable
|
2007-05-27 10:26:43 +00:00
|
|
|
* CF 04/05-2007 Made it compatible with 64-bit operating systems
|
2003-08-24 10:36:07 +00:00
|
|
|
*/
|
|
|
|
#include "raw.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* CRawCodec */
|
|
|
|
|
|
|
|
CRawCodec::CRawCodec()
|
|
|
|
/*
|
|
|
|
* FUNCTION: Default constructor
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CRawCodec::~CRawCodec()
|
|
|
|
/*
|
|
|
|
* FUNCTION: Default destructor
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-18 13:08:58 +00:00
|
|
|
ULONG CRawCodec::Compress(void* OutputBuffer,
|
|
|
|
void* InputBuffer,
|
|
|
|
ULONG InputLength,
|
|
|
|
PULONG OutputLength)
|
2003-08-24 10:36:07 +00: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 11:57:16 +00:00
|
|
|
memcpy(OutputBuffer, InputBuffer, InputLength);
|
|
|
|
*OutputLength = InputLength;
|
|
|
|
return CS_SUCCESS;
|
2003-08-24 10:36:07 +00:00
|
|
|
}
|
|
|
|
|
2007-08-18 13:08:58 +00:00
|
|
|
ULONG CRawCodec::Uncompress(void* OutputBuffer,
|
|
|
|
void* InputBuffer,
|
|
|
|
ULONG InputLength,
|
|
|
|
PULONG OutputLength)
|
2003-08-24 10:36:07 +00: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 11:57:16 +00:00
|
|
|
memcpy(OutputBuffer, InputBuffer, InputLength);
|
|
|
|
*OutputLength = InputLength;
|
|
|
|
return CS_SUCCESS;
|
2003-08-24 10:36:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|