Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!iuvax!uceng!dsims From: dsims@uceng.UC.EDU (david l sims) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: **** WANTED **** BINARY FILE COPY PROGRAM Message-ID: <6177@uceng.UC.EDU> Date: 21 Sep 90 13:03:17 GMT References: <90263.114424POTELLE@MAINE.BITNET> <1990Sep21.071337.10847@uwasa.fi> Organization: Univ. of Cincinnati, College of Engg. Lines: 20 ts@uwasa.fi (Timo Salmi LASK) writes: >In article <90263.114424POTELLE@MAINE.BITNET> POTELLE@MAINE.BITNET (John A. Potelle) writes: >>This program should be able to copy PARTS of files, given a starting >>relative address within the source file and a length. >>Example of a possible command line syntax: >>chopcopy [-s100 [-l360]] >>HEX or DECimal addressess/lengths - I don't care which... >>Anyone know of such a beast or care to write one ? > BTW writing a slow program that does what you want should be >trivial. The trick is to make it a relatively fast one. I agree. Writing a slow program is trivial. Furthermore, a little bit of buffering on the programmer's part will achieve a large speedup (I can't say exactly how much). For those who aren't sure how to buffer their program, one solution is to perform read's and write's in, say, 10000 byte blocks, instead of the usual and simple method of reading and writing one character at a time.