From 408aca47fd423e7c4c38665b892a13c1c9fb1e9a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 11 Jun 2007 07:31:52 +0000 Subject: Few minor tweaks to bzip2, it reports errors now...and there's a bug in odpm that could be in this, but it's going to be hard to tell... --- src/tests/bzip2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tests') diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp index ef9328f..683d3d7 100644 --- a/src/tests/bzip2.cpp +++ b/src/tests/bzip2.cpp @@ -6,17 +6,17 @@ int main( int argc, char *argv[] ) char buf[1024]; size_t nRead; - Bu::File f( "test.bz2", "rb" ); + Bu::File f( "test.bz2", "wb" ); Bu::BZip2 bz2( f ); - Bu::File fin( argv[1], "wb"); + Bu::File fin( argv[1], "rb"); for(;;) { - nRead = bz2.read( buf, 1024 ); + nRead = fin.read( buf, 1024 ); if( nRead > 0 ) - fin.write( buf, nRead ); - if( bz2.isEOS() ) + bz2.write( buf, nRead ); + if( fin.isEOS() ) break; } } -- cgit v1.2.3