http encodings

M

Manlio Perillo

Hi.
RFC 2068 (Hypertext Transfer Protocol -- HTTP/1.1), introduces 4
encoding names:

identity
gzip (x-gzip)
compress (x-compress)
deflate

Unfortunately standard Python library does not includes these codecs
in the codec registry, ad example with an http_encodings package.
This will allow one to do:
data = read().encode( getheader('Content-encoding').split() )

Actually identity codec is banal.
-gzip: it is easy to implement using gzip module (I have written the
encode and decode methods, but it should be possible to write also
StreamWriter and StreamReader classes)

-deflate: codec is the same as zlib_codec?

-compress: where can I find it?



Thanks and regards Manlio Perillo
 
J

John J. Lee

Manlio Perillo said:
Hi.
RFC 2068 (Hypertext Transfer Protocol -- HTTP/1.1), introduces 4
encoding names:

identity
gzip (x-gzip)
compress (x-compress)
deflate [...]
Actually identity codec is banal.
-gzip: it is easy to implement using gzip module (I have written the
encode and decode methods, but it should be possible to write also
StreamWriter and StreamReader classes)

Would be good to have these. Maybe this is useful:

http://effbot.org/zone/consumer-gzip.htm

-deflate: codec is the same as zlib_codec?

-compress: where can I find it?

Dunno, but section 3.5 of RFC 2616 (the latest HTTP/1.1 RFC) certainly
makes a distinction between the three encodings.


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top