473,657 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1688
On Wed, 23 Jul 2008 13:32:16 -0700 (PDT), CSharper <cs******@gmx.c om>
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...@o ptushome.com.au wrote:
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
4531
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" ACTION="UploadAction.asp" METHOD="POST" enctype=multipart/form-data> <input type="file" name="fileName"> //etc ... </FORM>
7
1697
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" ACTION="UploadAction.asp" METHOD="POST" enctype=multipart/form-data> <input type="file" name="fileName"> //etc ... </FORM>
7
1591
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 possible that a Data-type which can hold an unlimited numbers of numbers :D exists I would be happy or if it is possible to Override the Dim-function... Hilsen fra Peter
1
2054
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: <root> <filename>somefile.exe</filename> <bindata>bindata in base64 here</bindata> </root>
0
1355
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 file suppose file1 like ...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.