473,378 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

http encodings

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
Jul 18 '05 #1
1 1437
Manlio Perillo <NO******************@libero.it> writes:
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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: P | last post by:
Hi, How would one get a list of encodings that can be passed to "".encode() I know base64,utf8,latin,ascii work and these are listed in the encodings and codecs modules, but where can one...
27
by: John Roth | last post by:
PEP 263 is marked finished in the PEP index, however I haven't seen the specified Phase 2 in the list of changes for 2.4 which is when I expected it. Did phase 2 get cancelled, or is it just not...
5
by: F. GEIGER | last post by:
I'm on WinXP, Python 2.3. I don't have problems with umlauts (ä, ö, ü and their uppercase instances) in my wxPython-GUIs, when displayed as static texts. But when filling controls with text...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
10
by: Bugs | last post by:
I believe I read in a relatively recent thread that the reason python24.dll is so large compared to previous releases is that all the language encodings are linked into the library? Are there...
3
by: Grzegorz Smith | last post by:
Hi all. I have got situation: i load data from database(MSSQL) wchich are encoded cp1250 and I fill template with that data (Cheetah Template), after all i want to save template to file on disk....
40
by: apprentice | last post by:
Hello, I'm writing an class library that I imagine people from different countries might be interested in using, so I'm considering what needs to be provided to support foreign languages,...
6
by: Raphael.Benedet | last post by:
Hello, For my application, I would like to execute an SQL query like this: self.dbCursor.execute("INSERT INTO track (name, nbr, idartist, idalbum, path) VALUES ('%s', %s, %s, %s, '%s')" %...
13
by: mario | last post by:
Hello! i stumbled on this situation, that is if I decode some string, below just the empty string, using the mcbs encoding, it succeeds, but if I try to encode it back with the same encoding it...
3
by: Philip Semanchuk | last post by:
On Nov 9, 2008, at 7:00 PM, News123 wrote: Look under the heading "Standard Encodings": http://docs.python.org/library/codecs.html Note that both the page you found (which appears to be a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.