Article View: borland.public.cppbuilder.nativeapi
Article #14551Re: Files syncronization
From: Remy Lebeau (TeamB)
Date: Thu, 07 Aug 2003 00:47
Date: Thu, 07 Aug 2003 00:47
39 lines
2611 bytes
2611 bytes
"ScOe" <sven.savic@zg.hinet.hr> wrote in message news:3f318f93@newsgroups.borland.com... > I have encounter too many times, after downloading > 15MB and more that downloaded file is corrupted ... The only way that can happen is either 1) when you are already downloading pieces of the file and did not synch them up correctly, 2) the file is already corrupt on the server, or 3) your HD is corrupted. Please show your actual code that is corrupting files. > now i want to make a download manager that will synch > my file on drive and that on the FTP server or so, and > download only those corrupted bits, bytes or megabytes. FTP does not support downloading pieces of files. You can start the download at a particular offset, but the download will progress to the end of the file regardless. You have no way of knowing which bytes are corrupted unless you do a byte-for-byte comparison of both files in full, in which case you have to download the server's file entirely any way so you may as well just re-download it in full each time. Your only hope that I can think of right now is if you are writing your own FTP server and client, in which case you can implement your own custom SITE commands. You could implement such a command that performs a CRC check on the client's file, then request a CRC check of the server's file, then compare the results, and if needed then implement another custom SITE command that transfers only pieces of the file. Of course, implementing custom commands means that your stuff will not work with other third-party clients/servers at all, unless they are updated to support your commands (good luck on that). Gambit
Technical Details
Message-ID:
<3f31a01e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f318f93@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4256cffb791dcc30 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-06 17:54:14 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f318f93@newsgroups.borland.com> Subject: Re: Files syncronization Date: Wed, 6 Aug 2003 17:47:24 -0700 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f31a01e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060216862 207.175.226.26 (6 Aug 2003 17:41:02 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail