roundtrip

command
v2.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Roundtrip takes a tree its whole way round, with a store on disk.

It builds a tree from a folder, checks it, fetches it into a second store as a receiver would, reads stretches of its largest file without the rest, writes the tree out again, and holds the copy to the same root. It prints how long each step took.

go run ./examples/roundtrip <folder> <work-dir>

<work-dir> must not exist. The stores and the copy are made in it.

The store here keeps each thing as a file named by its hash. It is the smallest store that does not hold a tree in memory, and it shows what a store has to do: keep bytes under a hash, and give them back.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL