docs: def decompress(self, data):
          """
          Decompress part of a complete Brotli-compressed string.
  
          :param data: A bytestring containing Brotli-compressed data.
          :returns: A bytestring containing the decompressed data.
          """
          chunks = []
  
          available_in = ffi.new("size_t *", len(data))
          in_buffer = ffi.new("uint8_t[]", data)
          next_in = ffi.new("uint8_t **", in_buffer)
  
          while True:
              # Allocate a buffer that's hopefully overlarge, but if it's not we
              # don't mind: we'll spin around again.
              buffer_size = 5 * len(data)
              available_out = ffi.new("size_t *", buffer_size)
              out_buffer = ffi.new("uint8_t[]", buffer_size)
              next_out = ffi.new("uint8_t **", out_buffer)
  
              rc = lib.BrotliDecoderDecompressStream(self._decoder,
                                                     available_in,
                                                     next_in,
                                                     available_out,
                                                     next_out,
                                                     ffi.NULL)
  
              # First, check for errors.
              if rc == lib.BROTLI_DECODER_RESULT_ERROR:
                  error_code = lib.BrotliDecoderGetErrorCode(self._decoder)
                  error_message = lib.BrotliDecoderErrorString(error_code)
                  raise Error(
                      "Decompression error: %s" % ffi.string(error_message)
                  )
  
              # Next, copy the result out.
              chunk = ffi.buffer(out_buffer, buffer_size - available_out[0])[:]
              chunks.append(chunk)
  
              if rc == lib.BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:
                  assert available_in[0] == 0
                  break
              elif rc == lib.BROTLI_DECODER_RESULT_SUCCESS:
                  break
              else:
                  # It's cool if we need more output, we just loop again.
                  assert rc == lib.BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT
  
          return b''.join(chunks)