summaryrefslogtreecommitdiff
path: root/src/bzip2.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 05:30:43 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 05:30:43 +0000
commit7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2 (patch)
treee2d4bfccd81070adf7294ee54db2399df0c7171f /src/bzip2.cpp
parentf5aca1a1b402bd7ebc944dc6e6fe65828d863365 (diff)
downloadlibbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.gz
libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.bz2
libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.xz
libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.zip
Wow, got the Stream changes propegated, all tests build with string instead of
fstring, and updated the copyright notice to extend to 2011
Diffstat (limited to '')
-rw-r--r--src/bzip2.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bzip2.cpp b/src/bzip2.cpp
index a6fef25..5c35a26 100644
--- a/src/bzip2.cpp
+++ b/src/bzip2.cpp
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -37,7 +37,7 @@ void Bu::BZip2::start()
37 pBuf = new char[nBufSize]; 37 pBuf = new char[nBufSize];
38} 38}
39 39
40size_t Bu::BZip2::stop() 40Bu::size Bu::BZip2::stop()
41{ 41{
42 TRACE(); 42 TRACE();
43 if( bzState.state ) 43 if( bzState.state )
@@ -51,7 +51,7 @@ size_t Bu::BZip2::stop()
51 } 51 }
52 else 52 else
53 { 53 {
54// size_t sTotal = 0; 54// Bu::size sTotal = 0;
55 for(;;) 55 for(;;)
56 { 56 {
57 bzState.next_in = NULL; 57 bzState.next_in = NULL;
@@ -119,7 +119,7 @@ void Bu::BZip2::bzError( int code )
119 } 119 }
120} 120}
121 121
122size_t Bu::BZip2::read( void *pData, size_t nBytes ) 122Bu::size Bu::BZip2::read( void *pData, Bu::size nBytes )
123{ 123{
124 TRACE( pData, nBytes ); 124 TRACE( pData, nBytes );
125 if( !bzState.state ) 125 if( !bzState.state )
@@ -177,7 +177,7 @@ size_t Bu::BZip2::read( void *pData, size_t nBytes )
177 return 0; 177 return 0;
178} 178}
179 179
180size_t Bu::BZip2::write( const void *pData, size_t nBytes ) 180Bu::size Bu::BZip2::write( const void *pData, Bu::size nBytes )
181{ 181{
182 TRACE( pData, nBytes ); 182 TRACE( pData, nBytes );
183 if( !bzState.state ) 183 if( !bzState.state )
@@ -188,7 +188,7 @@ size_t Bu::BZip2::write( const void *pData, size_t nBytes )
188 if( bReading == true ) 188 if( bReading == true )
189 throw ExceptionBase("This bzip2 filter is in reading mode, you can't write."); 189 throw ExceptionBase("This bzip2 filter is in reading mode, you can't write.");
190 190
191// size_t sTotalOut = 0; 191// Bu::size sTotalOut = 0;
192 bzState.next_in = (char *)pData; 192 bzState.next_in = (char *)pData;
193 bzState.avail_in = nBytes; 193 bzState.avail_in = nBytes;
194 for(;;) 194 for(;;)
@@ -215,7 +215,7 @@ bool Bu::BZip2::isOpen()
215 return (bzState.state != NULL); 215 return (bzState.state != NULL);
216} 216}
217 217
218size_t Bu::BZip2::getCompressedSize() 218Bu::size Bu::BZip2::getCompressedSize()
219{ 219{
220 return sTotalOut; 220 return sTotalOut;
221} 221}