LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2009, 02:34 AM   #1
shashank929
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Rep: Reputation: 0
rsync mechanism of breaking files into chunks


I'm trying to understand the implementation of rsync where it breaks the files into chunks and computes weak checksum for each of them. But unable to get how it breaks the file and into chunks of what sizes.
Can anyone tell me how it is implmentated in rsync or give me any link where the code is explained.

Thanks in advance....
 
Old 05-05-2009, 07:24 AM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834

Rep: Reputation: 108Reputation: 108
Hya,

Is wikipedia good enough for theory?

In Debian, I roughly browsed source tree, it looks like (may be wrong)
Code:
#define MAX_BLOCK_SIZE ((int32)1 << 17)
#define OLD_MAX_BLOCK_SIZE ((int32)1 << 29)
in rsync.h

Happy Penguins!

Last edited by kaz2100; 05-05-2009 at 07:25 AM. Reason: typo
 
Old 05-06-2009, 01:28 AM   #3
shashank929
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
thanks

Thanks for that.....
I downloaded the code from site of rsync and in its rsync.h BLOCK_SIZE is 700.


Actually I've gone through wikipedia for theory but I want to understand the code of rsync which is not very well documented. Is there any other souce where I can find some help abt. it.
 
Old 05-08-2009, 06:54 AM   #4
shashank929
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for that.....
I downloaded the code from site of rsync and in its rsync.h BLOCK_SIZE is 700.
and the MAX_BLOCK_SIZE is ((int32)1<<17)

so, does this mean that the block size variable and is set as 700 bytes
and maximum value for it is the same as size of the integer(i thought this because of the 17 left shifts)

please help me with this......
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync only 60-day old files tajamari Linux - General 7 03-10-2010 02:50 PM
Diff for files with resequenced chunks johnsfine Linux - Software 1 04-16-2009 10:43 PM
[rsync] get the differences between the source files and the existing files djgerbavore Linux - Networking 2 06-04-2008 12:05 PM
rsync Vanished Files cornish Linux - Software 1 11-25-2007 06:35 PM
rsync skipping files s_siouris Linux - Software 4 04-06-2005 11:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration