git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* base85: Two tiny fixes
@ 2010-01-07 14:58 Andreas Gruenbacher
  2010-01-07 17:58 ` Nicolas Pitre
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Gruenbacher @ 2010-01-07 14:58 UTC (permalink / raw)
  To: git

While looking at the base85 code I found a bug in the debug code and an 
unnecessary call.  You may want to have a look at the two fixes here:

  http://www.kernel.org/pub/scm/linux/kernel/git/agruen/git.git

There is another little oddity in the way the de85 table is set up: 0 
indicates an invalid entry; to avoid this from clashing with a valid entry, 
valid entries are incremented by one and decremented again while decoding.  
This leads to slightly worse code than using a negative number to indicate 
invalid values (and avoiding to increment/decrement).

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-01-08 23:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 14:58 base85: Two tiny fixes Andreas Gruenbacher
2010-01-07 17:58 ` Nicolas Pitre
2010-01-08 13:02   ` Andreas Gruenbacher
2010-01-08 13:39   ` [PATCH 1/3] base85 debug code: Fix length byte calculation Andreas Gruenbacher
2010-01-08 13:39   ` [PATCH 2/3] base85: No need to initialize the decode table in encode_85 Andreas Gruenbacher
2010-01-08 15:46     ` Michael J Gruber
2010-01-08 15:55       ` Junio C Hamano
2010-01-08 16:17         ` [PATCH] base85: encode85() does not use the decode table Andreas Gruenbacher
2010-01-08 16:22         ` [PATCH] base85: encode_85() " Andreas Gruenbacher
2010-01-08 13:40   ` [PATCH 3/3] base85: Make the code more obvious instead of explaining the non-obvious Andreas Gruenbacher
2010-01-08 23:15     ` A Large Angry SCM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).