473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Huge data file

I have a data file which is 2.1GB (zipped), when the exe runs, it
copies the content of the zip file to a destination folder. What is
the best way to achive this? Current implementation is to zip the file
at the source and at the destination unzip the file and if the file
dates are different then copy the files over. Is there a better way to
do this other than zipping and unzipping?
Thanks.
Jul 23 '08 #1
5 1672
On Wed, 23 Jul 2008 13:32:16 -0700 (PDT), CSharper <cs******@gmx.com>
wrote:
>I have a data file which is 2.1GB (zipped), when the exe runs, it
copies the content of the zip file to a destination folder. What is
the best way to achive this? Current implementation is to zip the file
at the source and at the destination unzip the file and if the file
dates are different then copy the files over. Is there a better way to
do this other than zipping and unzipping?
Thanks.
When you create the big zipped file, also create a very small file at
the same time at the source. The small file contains a date/copy
number/serial number/whatever identifying the current iteration of the
large file.

Copy the small file to the destination first and check its date/etc.
against the date/etc. of the current version of the small file. If
they are different then update the small file and copy over the large
file. This avoids copying over the large file unless you have to -
the small file tells you enough to know whether there is an updated
version of the large file without having to copy the whole thing over
the network.

Zipping is a good way to reduce network load when you do have to get a
new copy of the large file.

A more radical solution would be for the update file to merely contain
the changes from the last time, though this might be too much effort
to set up from scratch. Probably easier to use a database at both
ends and to use the built-in synchronisation routines.

rossum

Jul 23 '08 #2
CSharper wrote:
I have a data file which is 2.1GB (zipped), when the exe runs, it
copies the content of the zip file to a destination folder. What is
the best way to achive this? Current implementation is to zip the file
at the source and at the destination unzip the file and if the file
dates are different then copy the files over. Is there a better way to
do this other than zipping and unzipping?
You can not avoid zipping and unzipping if you use a zip file.

You can avoid any intermediate files, if your app checks
dates and if necessary extract the file directly to final
destination.

Arne
Jul 24 '08 #3
Can I ask what is in the data file? Not specifics - but is it
* an archive of lots of other files
* raw binary data
* serialized .NET entities, such as xml

In the first bullet, you could perhaps read the archive with tools like
#ZipLib and only extract / copy the interesting files - but note that
you are on the limit of what this will work with. Alternatively, tools
like "robocopy" will work on the *extracted* files (not the single
archive) to efficiently copy on the changed data; you can use
OS/file-system compression rather a zip to allow this to work happily.

In the second bullet; well - that is tricky; the data is likely to be
fairly dense, so I'd be surprised if it compressed very well anyway...

In the third bullet - perhaps try an alternative data format to reduce
space? I have lots of current ideas in this area if you are interested...

Marc
Jul 24 '08 #4
On Wed, 23 Jul 2008 13:32:16 -0700, CSharper wrote:
I have a data file which is 2.1GB (zipped), when the exe runs, it copies
the content of the zip file to a destination folder. What is the best
way to achive this? Current implementation is to zip the file at the
source and at the destination unzip the file and if the file dates are
different then copy the files over. Is there a better way to do this
other than zipping and unzipping? Thanks.
You could look at the application rsync to allow synchronisation of files
that only change a little bit each time.

If you are talking a Database (eg Access) then look at replication.

Ta
Ken
Jul 24 '08 #5
On Jul 24, 6:14*am, Ken Foskey <rmove.fos...@optushome.com.auwrote:
On Wed, 23 Jul 2008 13:32:16 -0700, CSharper wrote:
I have a data file which is 2.1GB (zipped), when the exe runs, it copies
the content of the zip file to a destination folder. What is the best
way to achive this? Current implementation is to zip the file at the
source and at the destination unzip the file and if the file dates are
different then copy the files over. Is there a better way to do this
other than zipping and unzipping? Thanks.

You could look at the application rsync to allow synchronisation of files
that only change a little bit each time.

If you are talking a Database (eg Access) then look at replication.

Ta
Ken
Thanks to you all. I really appriciate your comments.
Jul 24 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
7
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
7
by: Peter Hansen | last post by:
Is in any way possible to define a variable as a integer-value which contain about 300 numbers in a row? I have thought about an Override-function for Data-types but I dunno how - but if it is...
1
by: rickbear | last post by:
Hi Group, I have an xml file wich contains a rootelement and a subelement with a filename and a subelement with bindata. In each xml file there is only one entry for each element. Like this: ...
0
by: ranganadh | last post by:
Dear Group members, I am new to LINQ, pls help on the deeling with huge amount of data with the C# stand Alone application. I have two file, which contains more then 2 lacs lines in every...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.