On Nov 28, 2007 3:18 PM, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > On Wed, Nov 28, 2007 at 10:05:40PM +0100, Gianmaria Iaculo - NVENTA wrote > regarding Re: Bit Operations: > > > > Txs all, > > i wont to respond to who asked why i needed it: > > > > I'm using python on GSM modules and the informations i have to move goes > > along GPRS/UMTS connections so it's beatiful for me to transfer more > > informations with less space... > > imagine i have to send this simple data.... > > > > 41.232323,12.345678 > > > > i can send it as it's or use the nibble trick and on the receiving station > > 'unlift" the data and rebuild the original information... > > > > isn'it??? > > > > Um, no. It isn't. How exactly are you going to pack floating point numbers > into a half a byte? > > Or are you sending it as strings? Also a waste of space, and unnecessarily > complex. >
Assuming these are coordinates, not floats, using strings makes sense but the zlib module is probably a much better choice than a hand-written compression scheme. -- http://mail.python.org/mailman/listinfo/python-list