remram44 / syncfast Goto Github PK
View Code? Open in Web Editor NEWA clone of rsync in Rust
License: BSD 3-Clause "New" or "Revised" License
A clone of rsync in Rust
License: BSD 3-Clause "New" or "Revised" License
It would be nice if the public API of this crate would allow to call apply_diff and hash_files (or equivalent functions) with buffers that implement the Read, Seek and Write trait (as needed).
It seems like this is already the case for delta::write_delta_file_single.
This would allow for cases where one of the participating files is not accessible by the local file system.
It should be possible to specify directories as old-file
and new-file
. Then the delta file would contain the path of each file with its delta.
Something like:
$ syncfast index old/folder
$ syncfast diff -o patch.bin old/folder/.syncfast.idx new/folder
$ syncfast patch patch.bin old/folder
Currently, if a file hasn't changed, a new version of it will still be written to a part file (copying blocks from the local file) and then the part file will be moved over the (identical) file.
It would be good to instead not do anything.
I thought of adding full-file hashes to the index and using that, but that means changing the sync protocol as well (the source needs to send that hash, and the sink needs to request the file if it's different...) Instead I can just delay creating the part file until a block is received that is different (then we copy the file up to that point to the part file, and receive the following blocks).
The delta stream should be able to reference previously encountered blocks in the output stream, e.g. blocks that appear multiple times should not lead to multiple LITERAL entries (even if they are not in the index).
I developed a small linux server backup application in flutter/dart that runs on a local windows machine, this application backs up servers via SSH/SFTP, but currently it only does full backups, it doesn't do incremental backups and it's quite slow, I I want to port this application to rust, using the lib "syncfast" makes the synchronization of a directory on a linux server to a windows machine?
I'm currently working on offline syncing, the rsdiff binary, which uses files to exchange the index then the delta.
The second step is online syncing, where a socket is used to sync files, for example over SSH.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.