Post
Topic
Board Development & Technical Discussion
Re: Blockchain parsing
by
kerzane
on 20/05/2013, 12:27:00 UTC
Anyone know the solution to this problem?

https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_integer

Read the first byte as uint8 and check its value, you have 4 choices,

<0xFD:          use the value as it is
  0xFD:           read 2 more bytes as uint16
  0xFE:           read 4 more bytes as uint32
  0xFF:           read 8 more bytes as uint64


Thanks Zeilap, I think I follow, I hadn't found that entry in the specification before, I'll try it out when I get a chance.