#include <bu/myriad.h>
#include <bu/myriadstream.h>
#include <bu/string.h>
#include <bu/sio.h>
#include <bu/file.h>

int main( int , char *[] )
{
    Bu::File fMyriad("test.myr", Bu::File::WriteNew|Bu::File::Read );
    Bu::Myriad m( fMyriad, 32 );

    Bu::MyriadStream ms = m.create( Bu::Myriad::ReadWrite );
    ms.setSize( 150 );
    ms.setPos( 145 );
    char stuff[10];
    int32_t iRead = ms.read( stuff, 10 );

    Bu::println("Tried to read 10, expect 5, got %1").arg( iRead );


    return 0;
}

