#hashing #checksum #performance #hashing-checksum #media-files

oshash

Fast media file hashing using first/last 64KB chunks and file size; Rust port of the Python oshash library

10 unstable releases (3 breaking)

0.4.0 Apr 14, 2026
0.3.1 Dec 20, 2025
0.2.2 Jul 13, 2025
0.2.0 Nov 17, 2024
0.1.1 Dec 3, 2022

#2401 in Algorithms

34 downloads per month
Used in oshash-cli

GPL-3.0-or-later

275KB
106 lines

oshash

Crates.io Documentation Codecov Dependency status

Contains a hashing method that matches the hashing method described here: https://pypi.org/project/oshash/

This hashing method is particularly useful when you don’t want to read an entire file’s bytes to generate a hash, provided you trust that any changes to the file will cause byte differences in the first and last bytes of the file, or a change to its file size.

CLI Utility

A command line utility is provided to generate hashes for files specified as arguments.

$ oshash test-resources/testdata
40d354daf3acce9c test-resources/testdata

Dependencies

~0–630KB