How to efficiently read binary files?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

How to efficiently read binary files?

From: David Lees <debl2NoSpam@verizon.net>
Date: Sun Apr 30 2006 - 23:45:03 CEST

I want to process large binary files (>2GB) in Python. I have played
around with prototypes in pure Python and profiled the code. Most of
the time seems to be spent converting back and forth to and from strings
using the struct module. Is there a way to directly read into an array
of integers in Python?

TIA

David Lees
Received on Mon May 1 00:48:16 2006