From 2f6b22ede60a89cced23d499cd77413b9301a16d Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 04:15:43 +0000 Subject: Adding the option to read or not the size in the lzss_decomp routine. --- lib/lzss.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/lzss.cpp b/lib/lzss.cpp index 1d7ecfb..7d86a32 100644 --- a/lib/lzss.cpp +++ b/lib/lzss.cpp @@ -105,7 +105,7 @@ void lzss::compute_limits(void) { printm(M_INFO, "Computed values: maxsize = %i, maxptr = 0x%06x\n", lzss_maxsize, lzss_maxptr); } -unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length) +unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length, bool read_length) { unsigned char bitmap, fbitmap; unsigned char valeur; @@ -125,7 +125,8 @@ unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_len compute_limits(); - f_source->read(&length, 4); + if (read_length) + f_source->read(&length, 4); if (true_length >= 0) { length = true_length; } -- cgit v1.2.3