Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 12th, 2005, 07:33 AM
Authorized User
 
Join Date: Dec 2004
Location: Salo, Loimaa, , Finland.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default Split large file to chunks

Hi

I would like to split large file to chunks (same size except the last chunk), and then recreate the file from the chunks on a different machine.
I have already web service to upload a whole file as a byte array, which then recreate the file from the array. That works fine for a limited size of file.

In this case, I want to send a part of the byte array, save them in a temp file (or other way...) and recreate the original file from there.

I appriciate any assistance or ideas...

Thanks a lot!!!

eelis
Reply With Quote
  #2 (permalink)  
Old January 12th, 2005, 11:50 AM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

WinZip® makes it easy to create Zip files that are split into smaller pieces of a size that you specify. There are several reasons why you might want to do this, such as:

To overcome e-mail size limits. Some e-mail systems limit the size of attachments; if you want to e-mail a large Zip file that exceeds your limit, you can split it into smaller parts and e-mail them separately. As an alternative to spanned Zip files when you want to make multiple copies of the disk set. As an alternative to spanned Zip files when you want to make the disk contents as a separate step from making the disks themselves. To assist with large downloads. Some users may have difficulty downloading very large Zip files from web sites, FTP sites, etc. You can use the split Zip feature to break large files into smaller pieces that can be downloaded separately.
To split a Zip file into smaller pieces:

Open or create the Zip file.
Choose Split from the Actions menu.
Specify the name to be used for the split Zip file. The name must be different from the name of the open Zip file.
Specify the size to be used for the individual parts. You can choose from common sizes using the Part size drop-down list or you can specify your own size. To specify your own size, choose "Other size" in the drop-down list and type the desired size in the Other size field. You can specify the size in bytes, kilobytes (KB), or megabytes (MB); indicate which you're using by clicking the appropriate radio button. The minimum size allowed is 65,536 bytes (64KB). Click OK to create the split Zip file.


Dude
Reply With Quote
  #3 (permalink)  
Old January 18th, 2005, 05:56 AM
Authorized User
 
Join Date: Dec 2004
Location: Salo, Loimaa, , Finland.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default

Thanks Dude but I'm trying to do it progaramaticaly using vb.net.
Is there any way to break-up a file (any file type) to chunks(parts) of specific given size, and then recreate the original file from the chunks?

Thanks again.
Reply With Quote
  #4 (permalink)  
Old January 18th, 2005, 01:35 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I would try getting the file size, creating a byte array of that size, then create smaller arrays reading selected chuncks of the larger array into them, finally saving those smaller arrays to individual files. It's gonna be slow...
Reply With Quote
  #5 (permalink)  
Old February 8th, 2005, 04:48 AM
Authorized User
 
Join Date: Dec 2004
Location: Salo, Loimaa, , Finland.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default

Thanks Brian for that great advice.
Apparently, it seems to work and not so slow...

I'm not saving it to individual files, but send them (as byte array) using a web service, and then regather them (append) on the other location.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LARGE FILE TRANSFER TOOL:QOODAA prawn RoR Ruby on Rails 0 June 25th, 2008 09:07 PM
Error while uploading large image file webnet ASP.NET 2.0 Basics 1 November 12th, 2007 09:32 AM
Downloading a large file in multiple segments ssaud .NET Framework 1.x 4 May 15th, 2007 06:56 AM
Using PHP to open a large file... arholly PHP How-To 0 March 6th, 2007 06:29 PM
Getting chunks from a graphic file mike_abc Pro VB.NET 2002/2003 0 April 12th, 2006 11:28 AM



All times are GMT -4. The time now is 07:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.