Possibly `decode.bytesRead = counter - offset`?