Implemented Packer::verifyOverlappingDecompression().

committer: mfx <mfx> 978465508 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2001-01-02 19:58:28 +00:00
parent d328e834b1
commit 572082ac2b
14 changed files with 58 additions and 58 deletions
+5 -3
View File
@@ -140,11 +140,13 @@ void PackUnix::pack(OutputFile *fo)
// compress
ph.u_len = l;
(void) compress(ibuf, obuf); // ignore return value
ph.overlap_overhead = 0;
(void) compress(ibuf, obuf); // ignore return value
if (ph.c_len < ph.u_len)
{
if (!testOverlappingDecompression(obuf, OVERHEAD))
ph.overlap_overhead = OVERHEAD;
if (!testOverlappingDecompression(obuf, ph.overlap_overhead))
throwNotCompressible();
}
else
@@ -165,7 +167,7 @@ void PackUnix::pack(OutputFile *fo)
if (ph.c_len < ph.u_len)
{
fo->write(obuf, ph.c_len);
verifyOverlappingDecompression(&obuf, OVERHEAD);
verifyOverlappingDecompression();
}
else
fo->write(ibuf, ph.u_len);