The Asymmetric Numeral Systems (ANS) encoder invented by Duda in 2009 is an entropy encoder that had an immense impact on the data compression, substituting arithmetic and Huffman coding. The optimality of the ANS was studied by Duda and others but the precise asymptotic behaviour of its redundancy (in comparison to the source entropy) was not completely understood. In this paper we establish an optimal bound on the redundancy for the tabled ANS (tANS), which is the most popular ANS variant used in practice. Let a1, a2, . . . , an be a sequence of letters from an alphabet {0, 1, . . . , σ −1} such that each letter a occurs in it fa times and n = 2 r , for an integer r. The tANS encoder using Duda's "precise initialization" to fill the tANS table transforms this sequence into a bit string of the following length (the table of frequencies is not included in the encoding size):where the O(σ + r) term can be upperbounded by σ log e + r. The r-bit additive term is an artifact of the initial encoder state, indispensable to ANS; the rest incurs a redundancy of O( σ n ) bits per letter, which improves the previously known bound O( σ n log n). We complement this upper bound with a series of examples showing that an Ω(σ + r) redundancy is indeed necessary when σ > n/3; the Ω(σ + r) in our construction is greater than σ−1 4 + r − 2. We argue that similar examples can be described for any reasonable methods that distribute letters in the tANS table using only the knowledge about frequencies. Thus, we disprove Duda's conjecture that the redundancy is O( σ n 2 ) bits per letter. We also propose a new variant of the range ANS (rANS), called rANS with fixed accuracy, that is parameterized by an integer k ≥ 1. In this variant the division operation, which is unavoidable in rANS encoders, is performed only in cases when its result belongs to the range [2 k ..2 k+1 ). Therefore, the division can be computed by faster methods provided k is small. We upperbound the redundancy for the rANS with fixed accuracy k by n 2 k −1 log e + r. The unconventional way by which we introduce the ANS encoders might be interesting by itself.