DZone Snippets13458 users tagging and storing useful source code snippets Never been to DZone Snippets before? Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world Simple function to format filesizes in bytes to human-readable units. 1 2 def prettySize(size): 3 suffixes = [("B",