PackageTrack
Sign in Get early access

size

A crate for expressing, formatting, and interacting with file sizes

0.5.0 4.1M downloads/mo #4942 most downloaded on crates.io neosmart/prettysize-rs

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 4 months to 3.5 years

Most releases are documented

notes for 6 of 10 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

12 releases · first in 2018

0 releases in the last 12 months

see the full history below

Release timeline

12 releases · Aug 2018 to Feb 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 12
  1. 0.5.0 02 Feb 2025
    Release notes

    What's Changed

    Full Changelog: 0.4.1...0.5.0

    This is the same release as 0.5.0-preview2 but with some clippy lints addressed.

    Open source →
  2. 0.5.0-preview2 27 Apr 2024 pre-release

    Nothing published for this version

  3. 0.5.0-preview1 26 Apr 2024 pre-release
    Release notes

    Bump to version 0.5.0-preview1

    Open source →
  4. 0.4.1 13 Oct 2022
    Release notes

    This update includes some hidden improvements as well as a few public-facing API changes.

    New features:

    • Size now implements AddAssign, SubAssign, MulAssign, and DivAssign.
    • SizeFormatter::new() is now a const function.

    Improvements:

    • Crate documentation has been improved further.
    • The MSRV (which is not guaranteed) has been reduced and currently the crate
      builds with rust 1.46.0.
    • Crate tests have been modified to pass on older versions of the rust compiler.
    • The FormattableSize and SizeFormatter APIs have been coalesced into the
      latter, reducing duplication and simplifying crate internals.

    Special thanks to first-time contributors @angusholder and @vic1707.

    Open source →
  5. 0.4.0 23 Jun 2022

    Nothing published for this version

  6. 0.3.1 22 Jun 2022

    Nothing published for this version

  7. 0.3.0 21 Jun 2022
    Release notes

    Add missing word from README.md

    Open source →
  8. 0.2.1 21 Jun 2022

    Nothing published for this version

  9. 0.2.0 17 Jun 2022
    Release notes

    This is a major (and slightly breaking) update to the PrettySize size crate,
    bringing significant new features, improvements to the API, and a complete
    overhaul of the documentation.

    The major changes from v0.1.x are outlined below:

    • Support for mathematical operations on strongly-typed Size<T> sizes, that
      include support for adding and subtracting Size instances and for
      multiplying/dividing Size instances by scalar values,
    • Support (both for creating/handling and for formatting/printing) negative file
      sizes, required to express the potentially negative difference between two
      Size values,
    • Size now implements PartialEq so Size values can be compared directly
      (instead of having to compare size1.bytes() and size2.bytes()),
    • Abbrevations are now available for the various strongly-typed Size
      discriminants, e.g. you can use let foo = Size::KiB(2); instead of let foo = Size::Kibibytes(2) (the resulting type is still the same for both),
    • The scalar constants have been moved from the crate root to size::consts to
      discourage their use in favor of the strongly-typed Size<T> approach,
    • Size instances can be compared for equality both directly and via
      references,
    • Size instances can now be compared for order (via PartialOrd),
    • The size crate can now be used in no_std mode by compiling with default
      features disabled (see the crate-level documentation for more info),
    • All types and methods have been extensively documented in addition to
      extensive crate- and module-level documentation.
    Open source →
  10. 0.1.2 07 Dec 2018
    Release notes

    The definition for TERABYTE was incorrect thanks to a fat-fingered
    copy-and-paste, leading to future base-10 definitions being off by a
    factor of 10^3. Thanks to @teschty for catching this.

    Open source →
  11. 0.1.1 16 Aug 2018
    Release notes

    Switch to u64 for all constants

    Open source →
  12. 0.1.0 11 Aug 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive