httk.core.datastream.bytestream_bytes

Classes

BytestreamBytes

Backend for streaming byte data backed by an actual bytes object.

Module Contents

class httk.core.datastream.bytestream_bytes.BytestreamBytes(content, **hints)

Bases: httk.core.datastream.bytestream_common.BytestreamCommon, httk.core.datastream.bytestream_backend.BytestreamBackend

Backend for streaming byte data backed by an actual bytes object. Compressed content is transparently decompressed according to the compression hint.

Parameters:
  • content (bytes | bytearray) – Bytes to expose as a stream.

  • **hints (Any) – Backend-selection and compression hints.

Raises:

ValueError – If the compression hint is unknown.

b: bytes
property name: str | None

Report that an in-memory stream has no source name.

property closed: bool

Report whether the in-memory stream is closed.