[Python-Dev] Zipfile needs? (original) (raw)
Guido van Rossum gvanrossum at gmail.com
Mon Jan 3 08:17:59 CET 2005
- Previous message: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations
- Next message: [Python-Dev] Re: Zipfile needs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Encryption/decryption support. Will most likely require a C extension since the algorithm relies on ints (or longs, don't remember) wrapping around when the value becomes too large.
You may want to do this in C for speed, but C-style int wrapping is easily done by doing something like "x = x & 0xFFFFFFFFL" at crucial points in the code (for unsigned 32-bit ints) with an additional "if x & 0x80000000L: x -= 0x100000000L" to simulate signed 32-bit ints.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations
- Next message: [Python-Dev] Re: Zipfile needs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]