Differential / delta copy -- how? 
Author Message
 Differential / delta copy -- how?

Manuel,

There is no API that does this. You'd have to do it directly, and I doubt that
you can pull it off in VB, since it would probably involve at least some ASM.

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please post/reply to the newsgroup(s) so
that everyone can benefit from the discussion.

Regards,

Klaus H. Probst, MCP

       ICQ: 22454937
      The VB Box: http://www.*-*-*.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~



Quote:
> Is there a way through the windows api or vb/vba of performing a
> differential copy on a file (that is, copying only those clusters or sectors
> that are not identical)?



Fri, 28 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Klaus, you haven't played around with doing ASM in typelibs from VB? Its
fun. :-)

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL):-)

random junk of dubious value is at:
http://www.trigeminal.com



Quote:
> Manuel,

> There is no API that does this. You'd have to do it directly, and I doubt
that
> you can pull it off in VB, since it would probably involve at least some
ASM.

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Please post/reply to the newsgroup(s) so
> that everyone can benefit from the discussion.

> Regards,

> Klaus H. Probst, MCP

>        ICQ: 22454937
>       The VB Box: http://members.xoom.com/kprobst/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > Is there a way through the windows api or vb/vba of performing a
> > differential copy on a file (that is, copying only those clusters or
sectors
> > that are not identical)?



Fri, 28 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Michael,

Quote:
> Klaus, you haven't played around with doing ASM in typelibs from VB? Its
> fun. :-)

Thankfully, no. Not yet, anyway... <g>

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Klaus H. Probst, MCP

~~~~~~~~~~~~~~~~~~~~~~~~~~~



Fri, 28 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Is there a way through the windows api or vb/vba of performing a
differential copy on a file (that is, copying only those clusters or sectors
that are not identical)?


Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
OK.  I'll have to pass on anything that gets the dreaded "it's fun."



Quote:
> Michael,

> > Klaus, you haven't played around with doing ASM in typelibs from VB? Its
> > fun. :-)

> Thankfully, no. Not yet, anyway... <g>

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Klaus H. Probst, MCP

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Well, it is fun to occasionally find yourself doing any of the following:

1) Changing code or data segments of an executable while it is in memory
2) Writing C++ in VB via typelibs
3) Writing ASM in VB via typelibs

And are a good sign that you have no life to speak of! :-)

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL):-)

random junk of dubious value is at:
http://www.trigeminal.com



Quote:
> OK.  I'll have to pass on anything that gets the dreaded "it's fun."



> > Michael,

> > > Klaus, you haven't played around with doing ASM in typelibs from VB?
Its
> > > fun. :-)

> > Thankfully, no. Not yet, anyway... <g>

> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Klaus H. Probst, MCP

> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Perhaps I should revise the question to: is there any relatively easy way
but programmatic way of doing it, perhaps through a third-party program or
control?  I suppose I could probably program pcAnywhere to do it.



Quote:
> Manuel,

> There is no API that does this. You'd have to do it directly, and I doubt
that
> you can pull it off in VB, since it would probably involve at least some
ASM.

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Please post/reply to the newsgroup(s) so
> that everyone can benefit from the discussion.

> Regards,

> Klaus H. Probst, MCP

>        ICQ: 22454937
>       The VB Box: http://members.xoom.com/kprobst/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > Is there a way through the windows api or vb/vba of performing a
> > differential copy on a file (that is, copying only those clusters or
sectors
> > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Manuel.

I'm trying to understand exactly the result you are looking for.  In
particular, what form of advantage you are expecting from this approach?

Programatically, you would need to open both files, read both files,
compare the individual bytes in the sectors, clusters (or whatever
particular number of bytes you choose to be a "block") and only write to
the destination file when the data in a block differs.

This would only seem to present a performance advantage when the cost of
reading from the destination file and doing the comparison is less than
the cost of just blindly writing/copying over the destination file.  Is
there is something else you are trying to accomplish?

George

Quote:

> Perhaps I should revise the question to: is there any relatively easy way
> but programmatic way of doing it, perhaps through a third-party program or
> control?  I suppose I could probably program pcAnywhere to do it.



> > Manuel,

> > There is no API that does this. You'd have to do it directly, and I doubt
> that
> > you can pull it off in VB, since it would probably involve at least some
> ASM.

> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Please post/reply to the newsgroup(s) so
> > that everyone can benefit from the discussion.

> > Regards,

> > Klaus H. Probst, MCP

> >        ICQ: 22454937
> >       The VB Box: http://members.xoom.com/kprobst/
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > > Is there a way through the windows api or vb/vba of performing a
> > > differential copy on a file (that is, copying only those clusters or
> sectors
> > > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
It's a very large file, and changes are only expected in a few blocks (it's
a kind of one-way replication of a dbs to a read-only copy).  I don't know
whether a straight copy would be faster or not over a fast
connection--that's what I want to test (though I am sure that over a 28.8 K
connection the delta copy must be faster).

I didn't think the comparison would need to take that long, because I'm not
sure one would need to compare all the bytes individually.  This is an area
I know nothing about, but couldn't one do a quick checksum on a block of
bytes and copy the block when the checksums don't match?


Quote:
> Manuel.

> I'm trying to understand exactly the result you are looking for.  In
> particular, what form of advantage you are expecting from this approach?

> Programatically, you would need to open both files, read both files,
> compare the individual bytes in the sectors, clusters (or whatever
> particular number of bytes you choose to be a "block") and only write to
> the destination file when the data in a block differs.

> This would only seem to present a performance advantage when the cost of
> reading from the destination file and doing the comparison is less than
> the cost of just blindly writing/copying over the destination file.  Is
> there is something else you are trying to accomplish?

> George


> > Perhaps I should revise the question to: is there any relatively easy
way
> > but programmatic way of doing it, perhaps through a third-party program
or
> > control?  I suppose I could probably program pcAnywhere to do it.



> > > Manuel,

> > > There is no API that does this. You'd have to do it directly, and I
doubt
> > that
> > > you can pull it off in VB, since it would probably involve at least
some
> > ASM.

> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > Please post/reply to the newsgroup(s) so
> > > that everyone can benefit from the discussion.

> > > Regards,

> > > Klaus H. Probst, MCP

> > >        ICQ: 22454937
> > >       The VB Box: http://members.xoom.com/kprobst/
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > > > Is there a way through the windows api or vb/vba of performing a
> > > > differential copy on a file (that is, copying only those clusters or
> > sectors
> > > > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
If you are opening one of these files over the connection then you are
already taking the hit of reading every byte of the file anyway. What format
is the file that you are going to attempt the diff copy?

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL):-)

random junk of dubious value is at:
http://www.trigeminal.com



Quote:
> It's a very large file, and changes are only expected in a few blocks
(it's
> a kind of one-way replication of a dbs to a read-only copy).  I don't know
> whether a straight copy would be faster or not over a fast
> connection--that's what I want to test (though I am sure that over a 28.8
K
> connection the delta copy must be faster).

> I didn't think the comparison would need to take that long, because I'm
not
> sure one would need to compare all the bytes individually.  This is an
area
> I know nothing about, but couldn't one do a quick checksum on a block of
> bytes and copy the block when the checksums don't match?



> > Manuel.

> > I'm trying to understand exactly the result you are looking for.  In
> > particular, what form of advantage you are expecting from this approach?

> > Programatically, you would need to open both files, read both files,
> > compare the individual bytes in the sectors, clusters (or whatever
> > particular number of bytes you choose to be a "block") and only write to
> > the destination file when the data in a block differs.

> > This would only seem to present a performance advantage when the cost of
> > reading from the destination file and doing the comparison is less than
> > the cost of just blindly writing/copying over the destination file.  Is
> > there is something else you are trying to accomplish?

> > George


> > > Perhaps I should revise the question to: is there any relatively easy
> way
> > > but programmatic way of doing it, perhaps through a third-party
program
> or
> > > control?  I suppose I could probably program pcAnywhere to do it.



> > > > Manuel,

> > > > There is no API that does this. You'd have to do it directly, and I
> doubt
> > > that
> > > > you can pull it off in VB, since it would probably involve at least
> some
> > > ASM.

> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > Please post/reply to the newsgroup(s) so
> > > > that everyone can benefit from the discussion.

> > > > Regards,

> > > > Klaus H. Probst, MCP

> > > >        ICQ: 22454937
> > > >       The VB Box: http://members.xoom.com/kprobst/
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > > > > Is there a way through the windows api or vb/vba of performing a
> > > > > differential copy on a file (that is, copying only those clusters
or
> > > sectors
> > > > > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?

Quote:

>It's a very large file, and changes are only expected in a few blocks (it's
>a kind of one-way replication of a dbs to a read-only copy).  I don't know
>whether a straight copy would be faster or not over a fast
>connection--that's what I want to test (though I am sure that over a 28.8 K
>connection the delta copy must be faster).

>I didn't think the comparison would need to take that long, because I'm not
>sure one would need to compare all the bytes individually.  This is an area
>I know nothing about, but couldn't one do a quick checksum on a block of
>bytes and copy the block when the checksums don't match?

Unless you have a process on the remote side of the connection, that can compute
checksums & communicate with a local process, you cannot compare two files
without reading the entire contents of the remote file across the wire.  Add
whatever procedures you intend to write, and the result is GUARANTEED (all other
factors being equal) to be slower than a simple file transfer.

Technically speaking, the checksum data COULD be stored internally as part of
the filesystem, in which case the presence of a remote process would be
GUARANTEED -- the filesystem manager itself.  Although I'm NOT an expert on
filesystems, I'm ASSUMING that checksums are computed on the fly by the
hardware, to verify reads & writes, but the checksum information is not actually
written to the drive.  Perhaps someone more qualified can clarify this?

Anyway, if PCAnywhere will do it, I'm confident that it would be more
cost-effective (and RELIABLE) than anything the average lone programmer could
(or would ever hope to) write.

HTH,

   Eric



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
I know for a fact pcAnywhere does delta transfers much much faster than full
transfers over a 28.8 K wire, so I assume it's NOT reading every byte over
the connection.  My GUESS as to what's going on is that each side of the
connection is independently reading the file to do the checksum, and then
only the checksums are read over the wire--but I might be talking nonsense
here.

It's an mdb file (surprise).  (Can't use replication in one of the cases
because of the large number of rows.  The tables get too big after the
replication GUID's and other junk are put in, and every now and then one
column on almost all the rows change, which takes up too much time in
replication and is just too many locks for Jet to handle.)



Quote:
> If you are opening one of these files over the connection then you are
> already taking the hit of reading every byte of the file anyway. What
format
> is the file that you are going to attempt the diff copy?

> --
> MichKa

> -------------------------------------
> don't send questions by e-mail unless
> you're paying for it. (TANSTAAFL):-)

> random junk of dubious value is at:
> http://www.trigeminal.com



> > It's a very large file, and changes are only expected in a few blocks
> (it's
> > a kind of one-way replication of a dbs to a read-only copy).  I don't
know
> > whether a straight copy would be faster or not over a fast
> > connection--that's what I want to test (though I am sure that over a
28.8
> K
> > connection the delta copy must be faster).

> > I didn't think the comparison would need to take that long, because I'm
> not
> > sure one would need to compare all the bytes individually.  This is an
> area
> > I know nothing about, but couldn't one do a quick checksum on a block of
> > bytes and copy the block when the checksums don't match?



> > > Manuel.

> > > I'm trying to understand exactly the result you are looking for.  In
> > > particular, what form of advantage you are expecting from this
approach?

> > > Programatically, you would need to open both files, read both files,
> > > compare the individual bytes in the sectors, clusters (or whatever
> > > particular number of bytes you choose to be a "block") and only write
to
> > > the destination file when the data in a block differs.

> > > This would only seem to present a performance advantage when the cost
of
> > > reading from the destination file and doing the comparison is less
than
> > > the cost of just blindly writing/copying over the destination file.
Is
> > > there is something else you are trying to accomplish?

> > > George


> > > > Perhaps I should revise the question to: is there any relatively
easy
> > way
> > > > but programmatic way of doing it, perhaps through a third-party
> program
> > or
> > > > control?  I suppose I could probably program pcAnywhere to do it.



> > > > > Manuel,

> > > > > There is no API that does this. You'd have to do it directly, and
I
> > doubt
> > > > that
> > > > > you can pull it off in VB, since it would probably involve at
least
> > some
> > > > ASM.

> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > Please post/reply to the newsgroup(s) so
> > > > > that everyone can benefit from the discussion.

> > > > > Regards,

> > > > > Klaus H. Probst, MCP

> > > > >        ICQ: 22454937
> > > > >       The VB Box: http://members.xoom.com/kprobst/
> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > > > > > Is there a way through the windows api or vb/vba of performing a
> > > > > > differential copy on a file (that is, copying only those
clusters
> or
> > > > sectors
> > > > > > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 Differential / delta copy -- how?
Um, as I said if you open by remote, you raed every byte. PcAnywhere has a
process running on each side, so my statement would not apply to it. Are you
going to have a remote process running?

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL):-)

random junk of dubious value is at:
http://www.trigeminal.com



Quote:
> I know for a fact pcAnywhere does delta transfers much much faster than
full
> transfers over a 28.8 K wire, so I assume it's NOT reading every byte over
> the connection.  My GUESS as to what's going on is that each side of the
> connection is independently reading the file to do the checksum, and then
> only the checksums are read over the wire--but I might be talking nonsense
> here.

> It's an mdb file (surprise).  (Can't use replication in one of the cases
> because of the large number of rows.  The tables get too big after the
> replication GUID's and other junk are put in, and every now and then one
> column on almost all the rows change, which takes up too much time in
> replication and is just too many locks for Jet to handle.)



> > If you are opening one of these files over the connection then you are
> > already taking the hit of reading every byte of the file anyway. What
> format
> > is the file that you are going to attempt the diff copy?

> > --
> > MichKa

> > -------------------------------------
> > don't send questions by e-mail unless
> > you're paying for it. (TANSTAAFL):-)

> > random junk of dubious value is at:
> > http://www.trigeminal.com



> > > It's a very large file, and changes are only expected in a few blocks
> > (it's
> > > a kind of one-way replication of a dbs to a read-only copy).  I don't
> know
> > > whether a straight copy would be faster or not over a fast
> > > connection--that's what I want to test (though I am sure that over a
> 28.8
> > K
> > > connection the delta copy must be faster).

> > > I didn't think the comparison would need to take that long, because
I'm
> > not
> > > sure one would need to compare all the bytes individually.  This is an
> > area
> > > I know nothing about, but couldn't one do a quick checksum on a block
of
> > > bytes and copy the block when the checksums don't match?



> > > > Manuel.

> > > > I'm trying to understand exactly the result you are looking for.  In
> > > > particular, what form of advantage you are expecting from this
> approach?

> > > > Programatically, you would need to open both files, read both files,
> > > > compare the individual bytes in the sectors, clusters (or whatever
> > > > particular number of bytes you choose to be a "block") and only
write
> to
> > > > the destination file when the data in a block differs.

> > > > This would only seem to present a performance advantage when the
cost
> of
> > > > reading from the destination file and doing the comparison is less
> than
> > > > the cost of just blindly writing/copying over the destination file.
> Is
> > > > there is something else you are trying to accomplish?

> > > > George


> > > > > Perhaps I should revise the question to: is there any relatively
> easy
> > > way
> > > > > but programmatic way of doing it, perhaps through a third-party
> > program
> > > or
> > > > > control?  I suppose I could probably program pcAnywhere to do it.



> > > > > > Manuel,

> > > > > > There is no API that does this. You'd have to do it directly,
and
> I
> > > doubt
> > > > > that
> > > > > > you can pull it off in VB, since it would probably involve at
> least
> > > some
> > > > > ASM.

> > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > > Please post/reply to the newsgroup(s) so
> > > > > > that everyone can benefit from the discussion.

> > > > > > Regards,

> > > > > > Klaus H. Probst, MCP

> > > > > >        ICQ: 22454937
> > > > > >       The VB Box: http://members.xoom.com/kprobst/
> > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~



> > > > > > > Is there a way through the windows api or vb/vba of performing
a
> > > > > > > differential copy on a file (that is, copying only those
> clusters
> > or
> > > > > sectors
> > > > > > > that are not identical)?



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 28 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Differential / delta copy -- how?

2. differential in a recordset

3. Microsoft Delta - ANYBODY OUT THERE?

4. Delta Files?

5. A control to perform WinDiff file deltas?

6. how to use Volume Shadow Copy to copy an in use file

7. Copying Nested Arrays w/Array.Copy

8. RichTextBox <ctrl>V pastes 2 copies, <alt>EP pastes 1 copy

9. Copy right infringe by copying icon?

10. Copy a file in a folder and past the copy in another folder

11. Find a copy a file with File.Copy method

12. Copying DBGrid contents to clipboard (Or copying a table from a Data component to clipboard)

 

 
Powered by phpBB® Forum Software