[Cialug] Efficiently removing the beginning of a file

Daniel A. Ramaley daniel.ramaley at DRAKE.EDU
Mon May 21 12:06:59 CDT 2007


On Monday 21 May 2007 11:33, Dave Weis wrote:
>On Mon, 21 May 2007, Daniel A. Ramaley wrote:
>> But i guess what i'm curious
>> about is the general problem; if there is a large file and you need
>> to remove some small number of bytes from the beginning of it, how
>> is that best accomplished?
>
>It depends on what you are doing with the file. If it's being used in
> a program that you have written, just use a seek/fseek equivalent for
> that language. It should take basically 0 additional time.

In my particular case, the file was a movie i had downloaded but which 
accidentally had a few kB of HTML tacked onto the beginning of the 
file. So i needed the file to have the HTML removed so a player 
application would recognize it.

------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA


More information about the Cialug mailing list