aboutsummaryrefslogtreecommitdiff
path: root/src/base64.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-25 16:04:43 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-25 16:04:43 +0000
commit052da60c2c5c4ce80ec0986ea07482348e7aa30a (patch)
tree32a951ea64de53b8c047d33b1d856fadbbe311fc /src/base64.h
parent7c9cf28012f65ce6a67651030b817d7d45eda62b (diff)
downloadlibbu++-052da60c2c5c4ce80ec0986ea07482348e7aa30a.tar.gz
libbu++-052da60c2c5c4ce80ec0986ea07482348e7aa30a.tar.bz2
libbu++-052da60c2c5c4ce80ec0986ea07482348e7aa30a.tar.xz
libbu++-052da60c2c5c4ce80ec0986ea07482348e7aa30a.zip
Base64 does line wrapping correctly on write, and also doesn't try to flush the
write buffer when reading is done. It's...strange, but yeah, it was doing that. Deflate also defaults to zlib compression now, which means you can compress & decompress without using any extra params. Turns out zlib auto-detect won't decompress raw streams, so this is the safest overall option, and the easiest to work with. zlib headers are small, and includes a crc at the end so you can be sure your data is accurate, raw does not.
Diffstat (limited to 'src/base64.h')
-rw-r--r--src/base64.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base64.h b/src/base64.h
index 53d7860..c081ac1 100644
--- a/src/base64.h
+++ b/src/base64.h
@@ -22,7 +22,7 @@ namespace Bu
22 class Base64 : public Bu::Filter 22 class Base64 : public Bu::Filter
23 { 23 {
24 public: 24 public:
25 Base64( Bu::Stream &rNext ); 25 Base64( Bu::Stream &rNext, int iChunkSize=0 );
26 virtual ~Base64(); 26 virtual ~Base64();
27 27
28 virtual void start(); 28 virtual void start();
@@ -51,6 +51,8 @@ namespace Bu
51 Decode = 0x02, 51 Decode = 0x02,
52 }; 52 };
53 Mode eMode; 53 Mode eMode;
54 int iChunkSize;
55 int iCurChunk;
54 }; 56 };
55}; 57};
56 58