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

Re: [PATCH 2/3] base85: No need to initialize the decode table in encode_85

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 8, 2010, 15:46 UTC
Message-ID
<4B475361.60506@drmicha.warpmail.net>
In-Reply-To
<1262958000-27181-2-git-send-email-agruen@suse.de>
Andreas Gruenbacher venit, vidit, dixit 08.01.2010 14:39:
> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
> ---

For the less informed it may be worthwhile to have an explanation in the commit message why encode_85() does not need to initialize the table. (I strongly suspect it's a matter of de vs. en, i.e. "because it only encodes but does not decode."...)

Show 16 quoted lines
>  base85.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/base85.c b/base85.c
> index 1d165d9..7204ce2 100644
> --- a/base85.c
> +++ b/base85.c
> @@ -84,8 +84,6 @@ int decode_85(char *dst, const char *buffer, int len)
>  
>  void encode_85(char *buf, const unsigned char *data, int bytes)
>  {
> -	prep_base85();
> -
>  	say("encode 85");
>  	while (bytes) {
>  		unsigned acc = 0;
Previous: Andreas GruenbacherNext: Junio C Hamano
Message 6 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.