summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-13 12:23:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-14 08:11:55 +0100
commitebe1f639cf65c20cee70aa55176bfb67e7b915f7 (patch)
tree3d80dace017cc053b69a53bfc2cce5ae0cf2f9eb /tools
parentb8d3d4ad0f5bf4f449118214a91219b98ee506c3 (diff)
loplugin:unusedmethods
Change-Id: I851eba4ca80eac9ee5896df53fbcd0f5ad125763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/zcodec/zcodec.cxx61
1 files changed, 0 insertions, 61 deletions
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 1707793839c2..a21003afb55f 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -239,56 +239,6 @@ tools::Long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uInt32 nSize )
return (mbStatus ? static_cast<tools::Long>(nSize - pStream->avail_out) : -1);
}
-tools::Long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uInt32 nSize )
-{
- int err = 0;
- size_t nInToRead;
-
- if ( mbFinish )
- return 0; // pStream->total_out;
-
- if (meState == STATE_INIT)
- {
- InitDecompress(rIStm);
- }
- auto pStream = static_cast<z_stream*>(mpsC_Stream);
- pStream->avail_out = nSize;
- pStream->next_out = pData;
- do
- {
- if ( pStream->avail_in == 0 && mnInToRead )
- {
- nInToRead = std::min(mnInBufSize, mnInToRead);
-
- sal_uInt32 const nRemaining = rIStm.remainingSize();
- if (nRemaining < nInToRead)
- {
- rIStm.SetError( ERRCODE_IO_PENDING );
- err= int(!Z_STREAM_END); // TODO What is appropriate code for this?
- break;
- }
-
- pStream->next_in = mpInBuf;
- pStream->avail_in = rIStm.ReadBytes(mpInBuf, nInToRead);
- mnInToRead -= nInToRead;
- }
- err = mbStatus ? inflate(pStream, Z_NO_FLUSH) : Z_ERRNO;
- if ( err < 0 )
- {
- // Accept Z_BUF_ERROR as EAGAIN or EWOULDBLOCK.
- mbStatus = (err == Z_BUF_ERROR);
- break;
- }
- }
- while ( (err == Z_OK) &&
- (pStream->avail_out != 0) &&
- (pStream->avail_in || mnInToRead) );
- if ( err == Z_STREAM_END )
- mbFinish = true;
-
- return (mbStatus ? static_cast<tools::Long>(nSize - pStream->avail_out) : -1);
-}
-
void ZCodec::ImplWriteBack()
{
auto pStream = static_cast<z_stream*>(mpsC_Stream);
@@ -302,17 +252,6 @@ void ZCodec::ImplWriteBack()
}
}
-void ZCodec::SetBreak( size_t nInToRead )
-{
- mnInToRead = nInToRead;
-}
-
-size_t ZCodec::GetBreak() const
-{
- auto pStream = static_cast<z_stream*>(mpsC_Stream);
- return ( mnInToRead + pStream->avail_in );
-}
-
void ZCodec::InitCompress()
{
assert(meState == STATE_INIT);