headerloop = @fragments.enum_for(:each_with_index).collect { |f, i| [b::Uint32be, f.id, b::Uint32be, offset((f.content.size) ,i)]}.flatten
#Then calculating the offset outside that block
...
Ruby On Creating a binary file with...
by podcaster,
March 11, 2010 13:18
Ruby On Creating a binary file with...
by podcaster,
March 11, 2010 07:38
Hi, thanks so much for the ...
File.open( "binary.bin", "wb" ) do |io| obj = BinData::String.new(:initial_value => "Binary file start-point").write(io) obj = BinData::Uint32be.new(:initial_value => 0).write(io) ...
Ruby Creating a binary file with...
Hi, I'm currently using Bin...
I managed to fix the offset...