From b1522d279d22725a731cb8db93ec2d077028374c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 26 May 2010 05:35:02 +0000 Subject: More tweaks and informational functions. --- src/tools/myriad.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/myriad.cpp b/src/tools/myriad.cpp index 535d7ac..73ceba1 100644 --- a/src/tools/myriad.cpp +++ b/src/tools/myriad.cpp @@ -106,8 +106,7 @@ int main( int argc, char *argv[] ) else { File fOut( opts.sFile, File::WriteNew|File::Read ); - Myriad m( fOut ); - m.initialize( opts.iBlockSize, opts.iPreallocate ); + Myriad m( fOut, opts.iBlockSize, opts.iPreallocate ); } break; @@ -121,6 +120,20 @@ int main( int argc, char *argv[] ) { File fIn( opts.sFile, File::Read ); Myriad m( fIn ); + sio << "Myriad info:" << sio.nl + << " Block size: " << m.getBlockSize() << sio.nl + << " Block count: " << m.getNumBlocks() << sio.nl + << " Blocks used: " << m.getNumUsedBlocks() << " (" + << m.getNumUsedBlocks()*100/m.getNumBlocks() << "%)" + << sio.nl + << " Stream count: " << m.getNumStreams() << sio.nl; + Bu::Array aStreams = m.getStreamIds(); + sio << " Stream info:" << sio.nl; + for( Bu::Array::iterator i = aStreams.begin(); i; i++ ) + { + sio << " " << Fmt(4) << *i << ") " + << m.getStreamSize( *i ) << "b" << sio.nl; + } } break; -- cgit v1.2.3