Parse UTXO of a transaction from chainstate
You are right, however you are not interpreting the result correctly. The value is indeed 287, that is (2288 &gt;&gt; 3)  + 1, however this does not mean that the bitvector contains 287 bytes, but that it contains 287 non-zero bytes, so when parsing the bitvector, you should decrease the byte counter only when you find a non-zero value. Here you have a piece of code that deals with this (n is 287 in this case):

# If n is set, the encoded value contains a bitvector. The following bytes are parsed until n non-zero bytes have
# been extracted. (If a 00 is found, the parsing continues but n is not decreased)
if n &gt; 0:
    bitvector = ""
    while n:
        data = utxo[offset:offset+2]
        if data != "00":
            n -= 1
        bitvector += data
        offset += 2


Notice that this is just a fragment of the code. I've coded a full decoder in Python recently, you can check out the code on github.