/* ** CPQDIF_SP_Nothing class. Implements a "do nothing" processor. ** Used when the PQDIF file is not compressed -- or for certain records ** which are never compressed. ** -------------------------------------------------------------------------- ** ** File name: $Workfile: proc_not.cpp $ ** Last modified: $Modtime: 9/20/00 10:22a $ ** Last modified by: $Author: Bill $ ** ** VCS archive path: $Archive: /Hank/DMM/FirmWare/Level3/ObDatMgr/proc_not.cpp $ ** VCS revision: $Revision: 6 $ */ #include "PQDIF_classes.h" #include "zlib.h" // Construction // ============ CPQDIF_SP_Nothing::CPQDIF_SP_Nothing() { } CPQDIF_SP_Nothing::~CPQDIF_SP_Nothing() { } bool CPQDIF_SP_Nothing::StreamEncode( void ) { bool status = FALSE; long sizeActual = 0; const BYTE * bufferInput; BYTE * bufferOutput; status = m_pstrm->ProcessRead( bufferInput, 0, sizeActual ); if( status ) { status = m_pstrm->ProcessWriteReserve( bufferOutput, sizeActual ); if( status ) { memcpy( bufferOutput, bufferInput, sizeActual ); m_checksum = adler32( m_checksum, (const Bytef *)bufferInput, sizeActual ); m_pstrm->ProcessWriteRelease( sizeActual ); } } return status; } bool CPQDIF_SP_Nothing::StreamDecode( void ) { bool status = FALSE; // Since we're doing nothing, decoding is the same // as encoding! status = StreamEncode(); return status; }