ZCodec::UpdateCRC is private

Change-Id: I2103f8a323d0454bdd1c779aadb99889ae1cf6e5
This commit is contained in:
Stephan Bergmann
2014-05-21 14:33:20 +02:00
parent b928cfb512
commit 4d2113250f
2 changed files with 8 additions and 7 deletions

View File

@@ -50,6 +50,8 @@ private:
void ImplInitBuf( bool nIOFlag );
void ImplWriteBack();
void UpdateCRC( sal_uInt8* pSource, long nDatSize );
public:
ZCodec( sal_uIntPtr nInBuf = 0x8000UL, sal_uIntPtr nOutBuf = 0x8000UL );
~ZCodec();
@@ -67,7 +69,6 @@ public:
void SetBreak( sal_uIntPtr );
sal_uIntPtr GetBreak();
void SetCRC( sal_uIntPtr nCurrentCRC );
sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize );
sal_uIntPtr GetCRC();
};

View File

@@ -159,7 +159,7 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
mnInToRead -= nInToRead;
if ( mbUpdateCrc )
mnCRC = UpdateCRC( mnCRC, mpInBuf, nInToRead );
UpdateCRC( mpInBuf, nInToRead );
}
err = inflate( PZSTREAM, Z_NO_FLUSH );
@@ -228,7 +228,7 @@ long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
mnInToRead -= nInToRead;
if ( mbUpdateCrc )
mnCRC = UpdateCRC( mnCRC, mpInBuf, nInToRead );
UpdateCRC( mpInBuf, nInToRead );
}
err = inflate( PZSTREAM, Z_NO_FLUSH );
@@ -282,7 +282,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize
mnInToRead -= nInToRead;
if ( mbUpdateCrc )
mnCRC = UpdateCRC( mnCRC, mpInBuf, nInToRead );
UpdateCRC( mpInBuf, nInToRead );
}
err = inflate( PZSTREAM, Z_NO_FLUSH );
@@ -309,7 +309,7 @@ void ZCodec::ImplWriteBack()
if ( nAvail )
{
if ( mbInit & 2 && mbUpdateCrc )
mnCRC = UpdateCRC( mnCRC, mpOutBuf, nAvail );
UpdateCRC( mpOutBuf, nAvail );
mpOStm->Write( PZSTREAM->next_out = mpOutBuf, nAvail );
PZSTREAM->avail_out = mnOutBufSize;
}
@@ -408,9 +408,9 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
}
}
sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize)
void ZCodec::UpdateCRC ( sal_uInt8* pSource, long nDatSize)
{
return rtl_crc32( nLatestCRC, pSource, nDatSize );
mnCRC = rtl_crc32( mnCRC, pSource, nDatSize );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */