forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

splitting files with c / c++

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
theshadguy



Joined: 04 Nov 2004
Posts: 12

PostPosted: Mon May 16, 2005 1:50 am    Post subject: splitting files with c / c++ Reply with quote

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
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon May 16, 2005 1:59 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Mon May 16, 2005 3:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
boomint



Joined: 13 Apr 2004
Posts: 80
Location: Sheffield, UK

PostPosted: Mon May 16, 2005 3:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Mon May 16, 2005 3:48 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Guest






PostPosted: Mon May 16, 2005 4:05 am    Post subject: Reply with quote

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

PostPosted: Mon May 16, 2005 10:06 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> General Discussion All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group