Ninjastic
Home
Search
Users
Boards
Addresses
Ctrl + K
Toggle theme
Open menu
Post
Edited versions
Quotes to this post
Post
2209819
Topic
210188
Board
Development & Technical Discussion
Re: Blockchain parsing
by
kerzane
on
20/05/2013, 12:27:00 UTC
Quote from: Zeilap on May 19, 2013, 11:08:56 PM
Quote from: kerzane on May 19, 2013, 02:40:00 PM
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.