Topic: Bit streams or bit queues
Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 10 Nov 2013 10:22:23 -0800 (PST)
Raw View
------=_Part_280_24148738.1384107743158
Content-Type: text/plain; charset=ISO-8859-1
I wonder if there is an interest in bit streams or bit queues which provide
the following member functions:
add(int n_bits, Integral x)
pop(int n_bits, Integral& x) ?
They are convenient for handling various compression algorithms and the
like.
s.add(4, 0xB)
s.pop(2, x); // x => 2
s.pop(1, x1); // x1 => 1
s.pop(1,x2); // x2 => 1
Usually we have to deal with shifts, creating our own classes when writing,
for example, compression algorithms.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_280_24148738.1384107743158
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I wonder if there is an interest in bit streams or bi=
t queues which provide the following member functions:</div><div><div>add(i=
nt n_bits, Integral x)</div><div>pop(int n_bits, Integral& x) ?</div><d=
iv> </div><div>They are convenient for handling various compression al=
gorithms and the like.</div><div>s.add(4, 0xB)</div><div>s.pop(2, x); // x =
=3D> 2</div><div>s.pop(1, x1); // x1 =3D> 1</div><div>s.pop(1,x2); //=
x2 =3D> 1</div><div> </div><div>Usually we have to deal with shift=
s, creating our own classes when writing, for example, compression algorith=
ms.</div><div> </div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_280_24148738.1384107743158--
.