Skip to content

Commit bc08d32

Browse files
committed
enable more padding options in state valuations
1 parent 2d3917a commit bc08d32

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

umbi/binary/composites.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def add_padding(self, num_bits: int):
160160
"""Add padding bits to the buffer."""
161161
assert num_bits > 0
162162
self.append_to_buffer(BitArray(uint=0, length=num_bits))
163-
self.assert_buffer_empty()
164163

165164
def pack_field(self, field: Field, value: object):
166165
"""Pack a single field into the buffer or the bytestring."""
@@ -227,7 +226,6 @@ def extract_from_buffer(self, num_bits: int):
227226

228227
def skip_padding(self, num_bits: int):
229228
self.extract_from_buffer(num_bits)
230-
self.assert_buffer_empty()
231229

232230
def unpack_field(self, field: Field) -> object:
233231
"""Unpack a single field from the buffer or the bytestring."""

umbi/binary/strings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def string_unpack(bytestring: bytes) -> tuple[str, bytes]:
3131
"""
3232
prefix_size = 2 # size of uint16
3333
prefix, bytestring = split_bytes(bytestring, prefix_size)
34-
print("prefix =", prefix)
3534
length = bytes_to_uint(prefix)
36-
print("length =", length)
3735
string_bytes, remainder = split_bytes(bytestring, length)
3836
string = bytes_to_string(string_bytes)
3937
return string, remainder

0 commit comments

Comments
 (0)