git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: base85: Two tiny fixes

From
AGAndreas Gruenbacher <agruen@suse.de>
Date
Jan 8, 2010, 13:02 UTC
Message-ID
<201001081402.02476.agruen@suse.de>
In-Reply-To
<alpine.LFD.2.00.1001071253400.21025@xanadu.home>
On Thursday 07 January 2010 18:58:01 Nicolas Pitre wrote:
> ACK.  Please post them to this list.
Okay, done.
Show 8 quoted lines
> On Thu, 7 Jan 2010, Andreas Gruenbacher wrote:
> > 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).
> 
> You can make a patch to modify that as well if you wish.
Nah, it's not worth the noise.
> And in that case don't forget to make de85 explicitly signed as a char is
> unsigned by default on some platforms.
I would have forgotten this; thanks for pointing it out!

Thanks, Andreas

Previous: Nicolas PitreNext: Andreas Gruenbacher
Message 3 of 11 in “base85: Two tiny fixes”
  1. Andreas GruenbacherJan 7, 2010
  2. Nicolas PitreJan 7, 2010
  3. Andreas GruenbacherJan 8, 2010
  4. 1/3 base85 debug code: Fix length byte calculationAndreas Gruenbacher, Jan 8, 2010
  5. 2/3 base85: No need to initialize the decode table in encode_85Andreas Gruenbacher, Jan 8, 2010
  6. Michael J GruberJan 8, 2010
  7. Junio C HamanoJan 8, 2010
  8. base85: encode85() does not use the decode tableAndreas Gruenbacher, Jan 8, 2010
  9. base85: encode_85() does not use the decode tableAndreas Gruenbacher, Jan 8, 2010
  10. 3/3 base85: Make the code more obvious instead of explaining the non-obviousAndreas Gruenbacher, Jan 8, 2010
  11. A Large Angry SCMJan 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.