diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-26 05:35:02 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-26 05:35:02 +0000 |
commit | b1522d279d22725a731cb8db93ec2d077028374c (patch) | |
tree | 9ad5f2471fdac3a9bbaddaf513ede562d87b8438 /src/tools | |
parent | 24ab24777d7cd72b7ff35a9d02cb43e26f006b0d (diff) | |
download | libbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.gz libbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.bz2 libbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.xz libbu++-b1522d279d22725a731cb8db93ec2d077028374c.zip |
More tweaks and informational functions.
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/myriad.cpp | 17 |
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 | ||