Use a ByteReader instead of Buffer for decode