Socket
Book a DemoInstallSign in
Socket

@fullstacked/sync

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullstacked/sync

Sync directories and files with a remote server

latest
npmnpm
Version
0.10.6
Version published
Maintainers
1
Created
Source

♻️ Rsync

A pure TypeScript implementation of the rsync algorithm

Installation

npm install @dldc/rsync

Usage

import { prepare, diff, apply } from '@dldc/rsync';

const checksum = prepare(destFile); // you can specify block size as second argument (default: 1024)
// send checksum to source
const patches = diff(sourceFile, checksum);
// send patches to dest
const syncedFile = apply(destFile, patches);

Performance

This package was not designed to be fast. Since it's implemented fully in TypeScript, it's not as fast as the C implementation of rsync. I tried to use the best practices to make it less slow but I did not benchmark it 🤷.

Dependencies 🪶

This package has a single dependency @dldc/erreur to define custom errors.

FAQs

Package last updated on 04 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts