| View previous topic :: View next topic |
| Author |
Message |
theshadguy
Joined: 04 Nov 2004 Posts: 12
|
Posted: Mon May 16, 2005 1:50 am Post subject: splitting files with c / c++ |
|
|
I know this really isnt homebrew, but its still dev related...
Does anyone know how to split up large files into multiple pieces? That is, I'm writing a program, and I have some lage files that need to be chopped up into smaller pieces. does anyone know how to do this? or any libs out there that may help me?
Thanks a bunch
J |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Mon May 16, 2005 1:59 am Post subject: |
|
|
Read a chunk from the source file.
Write the chunk to a dest file.
Read another chunk from the source file
Write the chunk to a different dest file.
Lather, rinse, repeat. _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
Thanhda

Joined: 09 Apr 2005 Posts: 331 Location: Canada
|
Posted: Mon May 16, 2005 3:06 am Post subject: |
|
|
go to gamedev.net _________________ There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
| Back to top |
|
 |
boomint
Joined: 13 Apr 2004 Posts: 80 Location: Sheffield, UK
|
Posted: Mon May 16, 2005 3:39 am Post subject: |
|
|
| Thanhda wrote: | | go to gamedev.net |
What on earth has gamedev.net got to do with splitting a file into abitrary sized chunks?
This is just common sense, logical, "how do I solve a problem?" thinking... ahem. _________________ --( someone stole my sig! )-- |
|
| Back to top |
|
 |
Thanhda

Joined: 09 Apr 2005 Posts: 331 Location: Canada
|
Posted: Mon May 16, 2005 3:48 am Post subject: |
|
|
| boomint wrote: | | Thanhda wrote: | | go to gamedev.net |
What on earth has gamedev.net got to do with splitting a file into abitrary sized chunks?
This is just common sense, logical, "how do I solve a problem?" thinking... ahem. |
well whenever i have a question that isnt psp/ps2 related but programming related i ask people at gamedev.net. since its erelevent to this homebrew comunity. _________________ There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Guest
|
Posted: Mon May 16, 2005 4:05 am Post subject: |
|
|
If you are on unix, there is the "split" command.
If you are on unix, I assume you know how to lookup how to use it. |
|
| Back to top |
|
 |
theshadguy
Joined: 04 Nov 2004 Posts: 12
|
Posted: Mon May 16, 2005 10:06 am Post subject: |
|
|
| haha well im only on unix (Linux) every once in a while, and yes I know how to look it up, but I'm not writing for linux at the moment |
|
| Back to top |
|
 |
|