aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/myriad.cpp17
1 files changed, 15 insertions, 2 deletions
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[] )
106 else 106 else
107 { 107 {
108 File fOut( opts.sFile, File::WriteNew|File::Read ); 108 File fOut( opts.sFile, File::WriteNew|File::Read );
109 Myriad m( fOut ); 109 Myriad m( fOut, opts.iBlockSize, opts.iPreallocate );
110 m.initialize( opts.iBlockSize, opts.iPreallocate );
111 } 110 }
112 break; 111 break;
113 112
@@ -121,6 +120,20 @@ int main( int argc, char *argv[] )
121 { 120 {
122 File fIn( opts.sFile, File::Read ); 121 File fIn( opts.sFile, File::Read );
123 Myriad m( fIn ); 122 Myriad m( fIn );
123 sio << "Myriad info:" << sio.nl
124 << " Block size: " << m.getBlockSize() << sio.nl
125 << " Block count: " << m.getNumBlocks() << sio.nl
126 << " Blocks used: " << m.getNumUsedBlocks() << " ("
127 << m.getNumUsedBlocks()*100/m.getNumBlocks() << "%)"
128 << sio.nl
129 << " Stream count: " << m.getNumStreams() << sio.nl;
130 Bu::Array<int> aStreams = m.getStreamIds();
131 sio << " Stream info:" << sio.nl;
132 for( Bu::Array<int>::iterator i = aStreams.begin(); i; i++ )
133 {
134 sio << " " << Fmt(4) << *i << ") "
135 << m.getStreamSize( *i ) << "b" << sio.nl;
136 }
124 } 137 }
125 break; 138 break;
126 139