Commit 627f4278 authored by Alberto Ramos's avatar Alberto Ramos

Bug parsing large records

parent 26d3143e
...@@ -421,6 +421,11 @@ end ...@@ -421,6 +421,11 @@ end
function BDIO_parse!(fb::BDIOstream) function BDIO_parse!(fb::BDIOstream)
seekstart(fb.io)
println(position(fb.io))
seekend(fb.io)
println(position(fb.io))
seekstart(fb.io) seekstart(fb.io)
ihdr = read(fb.io, Int32) ihdr = read(fb.io, Int32)
...@@ -447,6 +452,7 @@ function BDIO_parse!(fb::BDIOstream) ...@@ -447,6 +452,7 @@ function BDIO_parse!(fb::BDIOstream)
rlen::Int64 = 0 rlen::Int64 = 0
rpos::Int64 = 0 rpos::Int64 = 0
while !eof(fb.io) while !eof(fb.io)
println("Paso")
ihdr = read(fb.io, Int32) ihdr = read(fb.io, Int32)
ishdr = (mask = 1<<0; ihdr & mask != mask) ishdr = (mask = 1<<0; ihdr & mask != mask)
if ishdr if ishdr
...@@ -465,7 +471,7 @@ function BDIO_parse!(fb::BDIOstream) ...@@ -465,7 +471,7 @@ function BDIO_parse!(fb::BDIOstream)
rpos = position(fb.io) + 4 rpos = position(fb.io) + 4
ihdr2 = read(fb.io, Int32) ihdr2 = read(fb.io, Int32)
jlong = convert(Int64, ihdr2) jlong = convert(Int64, ihdr2)
rlen = ihdr>>>12 | jlong<<32 rlen = ihdr>>>12 | jlong<<20
else else
rpos = position(fb.io) rpos = position(fb.io)
rlen = ihdr>>>12 rlen = ihdr>>>12
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment