docs: def process(self, frames, eod):
          """Returns an iterator over tuples of the form (buffer, eod)
          where buffer is a fixed-sized block of data, and eod indicates whether
          this is the last block.
          In case padding is deactivated the last block may be smaller than
          the buffer size.
          """
          src_index = 0
          remaining = len(frames)
  
          while remaining:
              space = self.buffer_size - self.len
              copylen = remaining < space and remaining or space
              src = frames[src_index:src_index + copylen]
              if self.len == 0 and copylen == self.buffer_size:
                  # avoid unnecessary copy
                  buffer = src
              else:
                  buffer = self.buffer
                  buffer[self.len:self.len + copylen] = src
  
              remaining -= copylen
              src_index += copylen
              self.len += copylen
  
              if self.len == self.buffer_size:
                  yield buffer, (eod and not remaining)
                  self.len = 0
  
          if eod and self.len:
              block = self.buffer
              if self.pad:
                  self.buffer[self.len:self.buffer_size] = 0
              else:
                  block = self.buffer[0:self.len]
  
              yield block, True
              self.len = 0