Streams without read, write, save and restore.
Study the use cases (I am think of streams as keys in dict,
but is it usable without even a read?).
Maybe via a stream.copy(freeze=true) API? And/or a new constructor?
Name of the new class? Would be in the hierarchy of the "normal" stream
right? Unless they have a common base class that actually implements
100% of the ImmutableBitStream (find a better name) APi.
Now you would still have copy() to create a mutable version from
an immutable one.
Streams without read, write, save and restore.
Study the use cases (I am think of streams as keys in dict,
but is it usable without even a read?).
Maybe via a
stream.copy(freeze=true)API? And/or a new constructor?Name of the new class? Would be in the hierarchy of the "normal" stream
right? Unless they have a common base class that actually implements
100% of the
ImmutableBitStream(find a better name) APi.Now you would still have
copy()to create a mutable version froman immutable one.