<s>
Asymmetric	B-General_Concept
numeral	I-General_Concept
systems	I-General_Concept
(	O
ANS	O
)	O
is	O
a	O
family	O
of	O
entropy	B-Algorithm
encoding	I-Algorithm
methods	O
introduced	O
by	O
Jarosław	O
(	O
Jarek	O
)	O
Duda	O
from	O
Jagiellonian	O
University	O
,	O
used	O
in	O
data	B-General_Concept
compression	I-General_Concept
since	O
2014	O
due	O
to	O
improved	O
performance	O
compared	O
to	O
previous	O
methods	O
.	O
</s>
<s>
ANS	O
combines	O
the	O
compression	O
ratio	O
of	O
arithmetic	B-Algorithm
coding	I-Algorithm
(	O
which	O
uses	O
a	O
nearly	O
accurate	O
probability	O
distribution	O
)	O
,	O
with	O
a	O
processing	O
cost	O
similar	O
to	O
that	O
of	O
Huffman	B-General_Concept
coding	I-General_Concept
.	O
</s>
<s>
In	O
the	O
tabled	O
ANS	O
(	O
tANS	O
)	O
variant	O
,	O
this	O
is	O
achieved	O
by	O
constructing	O
a	O
finite-state	B-Architecture
machine	I-Architecture
to	O
operate	O
on	O
a	O
large	O
alphabet	O
without	O
using	O
multiplication	O
.	O
</s>
<s>
Among	O
others	O
,	O
ANS	O
is	O
used	O
in	O
the	B-Application
Facebook	I-Application
Zstandard	B-Language
compressor	O
(	O
also	O
used	O
e.g.	O
</s>
<s>
in	O
Linux	B-Application
kernel	O
,	O
Android	B-Application
operating	I-Application
system	I-Application
,	O
was	O
published	O
as	O
RFC8478	O
for	O
MIME	B-Protocol
and	O
HTTP	B-Protocol
)	O
,	O
Apple	O
LZFSE	B-Application
compressor	O
,	O
Google	B-Application
Draco	O
3D	O
compressor	O
(	O
used	O
e.g.	O
</s>
<s>
in	O
Pixar	O
Universal	B-General_Concept
Scene	I-General_Concept
Description	I-General_Concept
format	O
)	O
and	O
PIK	O
image	O
compressor	O
,	O
CRAM	O
DNA	O
compressor	O
from	O
SAMtools	B-Application
utilities	O
,	O
</s>
<s>
Dropbox	B-Application
DivANS	O
compressor	O
,	O
Microsoft	O
DirectStorage	O
BCPack	O
texture	O
compressor	O
,	O
and	O
JPEG	O
XL	O
image	O
compressor	O
.	O
</s>
<s>
For	O
an	O
entropy	B-Algorithm
coder	I-Algorithm
,	O
this	O
is	O
optimal	O
if	O
.	O
</s>
<s>
An	O
entropy	B-Algorithm
coder	I-Algorithm
allows	O
the	O
encoding	O
of	O
a	O
sequence	O
of	O
symbols	O
using	O
approximately	O
the	O
Shannon	O
entropy	O
bits	O
per	O
symbol	O
.	O
</s>
<s>
Then	O
performing	O
arithmetic	B-Algorithm
coding	I-Algorithm
on	O
the	O
source	O
requires	O
only	O
exact	O
arithmetic	O
with	O
integers	O
.	O
</s>
<s>
In	O
general	O
,	O
ANS	O
is	O
an	O
approximation	O
of	O
arithmetic	B-Algorithm
coding	I-Algorithm
that	O
approximates	O
the	O
real	O
probabilities	O
by	O
rational	O
numbers	O
with	O
a	O
small	O
denominator	O
.	O
</s>
<s>
Hence	O
the	O
symbol	O
of	O
probability	O
is	O
encoded	O
as	O
containing	O
bits	O
of	O
information	O
as	O
it	O
is	O
required	O
from	O
entropy	B-Algorithm
coders	I-Algorithm
.	O
</s>
<s>
tANS	O
variant	O
puts	O
the	O
entire	O
behavior	O
(	O
including	O
renormalization	O
)	O
for	O
into	O
a	O
table	O
which	O
yields	O
a	O
finite-state	B-Architecture
machine	I-Architecture
avoiding	O
the	O
need	O
of	O
multiplication	O
.	O
</s>
<s>
If	O
symbols	O
are	O
assigned	O
in	O
ranges	O
of	O
lengths	O
being	O
powers	O
of	O
2	O
,	O
we	O
would	O
get	O
Huffman	B-General_Concept
coding	I-General_Concept
.	O
</s>
<s>
As	O
for	O
Huffman	B-General_Concept
coding	I-General_Concept
,	O
modifying	O
the	O
probability	O
distribution	O
of	O
tANS	O
is	O
relatively	O
costly	O
,	O
hence	O
it	O
is	O
mainly	O
used	O
in	O
static	O
situations	O
,	O
usually	O
with	O
some	O
Lempel	B-Algorithm
–	I-Algorithm
Ziv	I-Algorithm
scheme	O
(	O
e.g.	O
</s>
<s>
ZSTD	B-Language
,	O
LZFSE	B-Application
)	O
.	O
</s>
<s>
In	O
contrast	O
,	O
rANS	O
is	O
usually	O
used	O
as	O
a	O
faster	O
replacement	O
for	O
range	B-Algorithm
coding	I-Algorithm
(	O
e.g.	O
</s>
<s>
Encoding	O
and	O
decoding	O
of	O
ANS	O
are	O
performed	O
in	O
opposite	O
directions	O
,	O
making	O
it	O
a	O
stack	B-Application
for	O
symbols	O
.	O
</s>
<s>
In	O
2015	O
,	O
Google	B-Application
published	O
a	O
US	O
and	O
then	O
worldwide	O
patent	O
for	O
"	O
Mixed	O
boolean-token	O
ans	O
coefficient	O
coding	O
"	O
.	O
</s>
<s>
At	O
the	O
time	O
,	O
Professor	O
Duda	O
had	O
been	O
asked	O
by	O
Google	B-Application
to	O
help	O
it	O
with	O
video	O
compression	O
,	O
so	O
was	O
intimately	O
aware	O
of	O
this	O
domain	O
,	O
having	O
the	O
original	O
author	O
assisting	O
them	O
.	O
</s>
<s>
Duda	O
was	O
not	O
pleased	O
by	O
(	O
accidentally	O
)	O
discovering	O
Google	B-Application
's	I-Application
patent	O
intentions	O
,	O
given	O
he	O
had	O
been	O
clear	O
he	O
wanted	O
it	O
as	O
public	O
domain	O
,	O
and	O
had	O
assisted	O
Google	B-Application
specifically	O
on	O
that	O
basis	O
.	O
</s>
<s>
The	O
USPTO	O
rejected	O
its	O
application	O
in	O
2018	O
,	O
and	O
Google	B-Application
subsequently	O
abandoned	O
the	O
patent	O
.	O
</s>
