Path: csiph.com!usenet.pasdenom.info!gegeweb.org!news.ecp.fr!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'wrote': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'temp': 0.16; 'issue.': 0.22; 'header:X-Complaints-To:1': 0.27; 'extract': 0.31; 'file': 0.32; 'option': 0.32; 'could': 0.34; 'version': 0.36; 'list': 0.37; 'performance': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'entire': 0.61; 'viable': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: fseek In Compressed Files Date: Sat, 1 Feb 2014 04:38:10 -0500 (EST) Organization: news.gmane.org References: <68316d1a-e52e-48b5-87df-7119f46ebabc@googlegroups.com> <897c196f-0812-43cf-9829-07993263207e@googlegroups.com> X-Gmane-NNTP-Posting-Host: dpc6744192077.direcpc.com X-Newsreader: PiaoHong Usenet NewsReaders 1.36 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391247311 news.xs4all.nl 2861 [2001:888:2000:d::a6]:59275 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65208 Ayushi Dalmia Wrote in message: > > > The size of this file will be 10 GB. The version of Python I am using is 2.7.2. Yes, performance is an important issue. > Then the only viable option is to extract the entire file and write it to a temp location. Perhaps as you extract it, you could also build a list of offsets, so the seeking by line number can be efficient. -- DaveA