SquirrelSizer 1.0.2

A simple to use file sizer

There is a newer version of this package available.
See the version list below for details.
Install-Package SquirrelSizer -Version 1.0.2
dotnet add package SquirrelSizer --version 1.0.2
<PackageReference Include="SquirrelSizer" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SquirrelSizer --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SquirrelSizer, 1.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SquirrelSizer as a Cake Addin
#addin nuget:?package=SquirrelSizer&version=1.0.2

// Install SquirrelSizer as a Cake Tool
#tool nuget:?package=SquirrelSizer&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Squirrel-Sizer

A simple to use file sizer.

To use it simple.

You give it a long number and it gives you a string with the size abbreviation suffix.

long number = 1024;
Sizer.SizeSuffix(number); // This will output 1.00kb

To use this with files is even as easy.

FileInfo info =  new FileInfo("C:\\Path\\To\\File\\file.txt");
Sizer.SizeSuffix(info.Length); // This will output the converted size of the file.
// So if the size of the file in bytes is 1024 it will give you 1.00kb

You also have these if you want them

Sizer.Zero; // This will give you 0.00bytes
Sizer.Max // This will give you 8.00EB

Squirrel-Sizer

A simple to use file sizer.

To use it simple.

You give it a long number and it gives you a string with the size abbreviation suffix.

long number = 1024;
Sizer.SizeSuffix(number); // This will output 1.00kb

To use this with files is even as easy.

FileInfo info =  new FileInfo("C:\\Path\\To\\File\\file.txt");
Sizer.SizeSuffix(info.Length); // This will output the converted size of the file.
// So if the size of the file in bytes is 1024 it will give you 1.00kb

You also have these if you want them

Sizer.Zero; // This will give you 0.00bytes
Sizer.Max // This will give you 8.00EB

  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.0 179 7/7/2020
1.1.0 173 7/6/2020
1.0.2 260 2/17/2020