Compression enum

Wire compression for subscriptions.

Inheritance
Available extensions

Values

none → const Compression

Plain JSON. Universally supported, slowest for binary payloads.

const Compression('none')
png → const Compression

PNG-encoded binary blob.

rosbridge PNG-compresses the entire JSON message string into an RGB image, so the win depends on how repetitive the JSON is: large for a mostly-empty occupancy grid, small for camera data whose base64 payload is already high-entropy. Decoding requires a full PNG + zlib decoder, so this client does not implement it — subscribing with png will log a status message and drop the frame. Prefer cbor.

const Compression('png')
cbor → const Compression

CBOR with RFC 8746 typed arrays. Best choice for images/point clouds.

const Compression('cbor')
cborRaw → const Compression

CBOR envelope wrapping the raw CDR-serialised ROS 2 message.

Requires a CDR decoder to interpret; Ros2Client surfaces it as bytes.

const Compression('cbor-raw')

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wireName → String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<Compression>
A constant List of the values in this enum, in order of their declaration.