bytearray supports fast deletion at the start and at the end, it avoids resizing the buffer in most cases. Using bytes or PyBytesWriter inside bytearray may lose this optimization, no?

1 Like