From 7ea5c06059ee6668d6e6d04c3b3dcb8557061696 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 15 Jun 2012 13:27:59 +0000 Subject: Bu::Myriad now only uses BitString during initialization, and I'm going to replace that with just an array, no problem. It's many, many, many times faster while streams are growing, and it should be constant time, not linear like it was before. It also handles myriad files in excess of 2gb correctly now, at least, it seems to just fine :) --- src/tests/bigmyriad.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/tests/bigmyriad.cpp (limited to 'src/tests') diff --git a/src/tests/bigmyriad.cpp b/src/tests/bigmyriad.cpp new file mode 100644 index 0000000..6661bf1 --- /dev/null +++ b/src/tests/bigmyriad.cpp @@ -0,0 +1,25 @@ +#include +#include +#include + +int main() +{ + Bu::File f("big.myr", Bu::File::Read|Bu::File::Write|Bu::File::Create ); + Bu::Myriad m( f, 2048 ); + + char *buf = new char[1024*1024*10]; + memset( buf, 0, 1024*1024*10 ); + + for( int j = 0; j < 250; j++ ) + { + m.openStream( m.createStream() ).write( buf, 1024*1024*10 ); +// m.sync(); + printf("\r%03d%%", (j+1)*100/250 ); + fflush( stdout ); + } + + printf("\n\n"); + + return 0; +} + -- cgit v1.2.3