Re: [PATCH 1/5] Add zlib decompress helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 10 Jan 2008, Marco Costalba wrote:
>
> When decompressing a zlib stream use this
> helpers instead of calling low level zlib
> function.

I really *really* hate your naming.

> This is the first step in generalizing compress and
> decompress functions avoiding zlib directly calls.

If that's the goal, why keep the horrible "z_" prefix, and why the opaque 
and non-obvious "inflate"/"deflate" names?

I'd suggest that you just replace all "z_deflate_" with "compress_" and 
"z_inflate_" with "decompress_".

Yes, it would still leave zlib-specific stuff in there (the return codes, 
the "z_stream" type thing etc), but at least it would be a _step_ towards 
more readable code and code that is less obviously zlib-specific.

With those changes, I'd heartily recommend merging this even if we never 
actually switch away from zlib, if only because zlib has all these 
horrible names.

		Linus

[ How many people really know that "inflate" means "uncompress", without 
  having to think about it a bit?

  I guarantee that any computer person immediately knows the difference 
  between "compress" and "decompress" without even thinking, but ask 
  somebody what "inflate" vs "deflate" does, and they'll be able to answer 
  you, but they'll first have to think about an air mattress or something.

  Yeah, yeah, old-time zip users probably think the whole xxflate thing 
  makes sense, and I'm just grouchy because _I_ always have to think 
  about it. ]
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux