{"id":24315410,"url":"https://github.com/mrsquirrely/squirrel-sizer","last_synced_at":"2025-08-10T04:10:28.262Z","repository":{"id":88406763,"uuid":"195126094","full_name":"MrSquirrely/Squirrel-Sizer","owner":"MrSquirrely","description":"A simple and easy to use file sizing utility","archived":false,"fork":false,"pushed_at":"2023-09-03T13:03:05.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T01:24:17.994Z","etag":null,"topics":["csharp","dotnet-standard","file-sizer","filesize","simple"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrSquirrely.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-03T21:03:38.000Z","updated_at":"2024-04-07T05:22:43.000Z","dependencies_parsed_at":"2023-09-10T00:53:04.558Z","dependency_job_id":null,"html_url":"https://github.com/MrSquirrely/Squirrel-Sizer","commit_stats":null,"previous_names":["mrsquirrelynet/squirrel-sizer","mr-squirrely-net/squirrel-sizer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MrSquirrely/Squirrel-Sizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrSquirrely%2FSquirrel-Sizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrSquirrely%2FSquirrel-Sizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrSquirrely%2FSquirrel-Sizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrSquirrely%2FSquirrel-Sizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrSquirrely","download_url":"https://codeload.github.com/MrSquirrely/Squirrel-Sizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrSquirrely%2FSquirrel-Sizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269673962,"owners_count":24457242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet-standard","file-sizer","filesize","simple"],"created_at":"2025-01-17T11:15:15.584Z","updated_at":"2025-08-10T04:10:28.234Z","avatar_url":"https://github.com/MrSquirrely.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squirrel-Sizer\nThis is a simple file sizing library.\n\nGoto https://www.nuget.org/packages/SquirrelSizer/\n\nTo use it is simple.\n\n### You give it a long number and it gives you a string with the size abbreviation suffix.\n\n```c#\nlong number = 1234500;\nSizer.Suffix(number); \n// This will output 1kb\n```\n\nor \n\n```c#\nlong number = 1234500;\nSizer.SuffixName(number); \n// This will output 1 Kilobyte\n```\n\n-------\n\n### It will always give you a number with your string\n### To stop it from giving you a number\n\n```c#\nlong number = 1234500;\nSizer.Suffix(number, includeNumber: false)\n// This will output kb\n```\n\n### You have to include the \"includeNumber:\" part, this is cause of the way I implemented it.\n### I might change this later.\n\n-------\n\n### To change how many decimal places to use it's easy as well\n\n```c#\nlong number = 1234500;\nSizer.SuffixName(number, 4)\n// This will output 1.1773 Kilobyte\n```\n\n```c#\nlong number = 1234500;\nSizer.SuffixName(number, 4, false)\n// This will output Kilobyte\n```\n\n\n\n-------\n### To use this with files is even as easy.\n\n```c#\nSizer.Suffix(\"C:\\\\Path\\\\To\\\\File\\\\file.txt\"); \n// This will output the converted size of the file.\n```\n\nor \n\n```c#\nSizer.SuffixName(\"C:\\\\Path\\\\To\\\\File\\\\file.txt\"); \n// This will output the converted size of the file.\n```\n\n-------\n\n### You can even get the complete size of multiple files\n\n```c#\nList\u003cstring\u003e files = new List\u003cstring\u003e() {\n            \"C:\\\\Path\\\\To\\\\File\\\\file1.txt\",\n            \"C:\\\\Path\\\\To\\\\File\\\\file2.txt\",\n            \"C:\\\\Path\\\\To\\\\File\\\\file3.txt\"\n        };\nSizer.AllSuffix(files); \n// This will output the size of all the files in the list\n```\n\nor\n\n```c#\nList\u003cstring\u003e files = new List\u003cstring\u003e() {\n            \"C:\\\\Path\\\\To\\\\File\\\\file1.txt\",\n            \"C:\\\\Path\\\\To\\\\File\\\\file2.txt\",\n            \"C:\\\\Path\\\\To\\\\File\\\\file3.txt\"\n        };\nSizer.AllSuffixName(files); \n// This will output the size of all the files in the list\n```\n\n-------\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsquirrely%2Fsquirrel-sizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsquirrely%2Fsquirrel-sizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsquirrely%2Fsquirrel-sizer/lists"}