Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.9% on proxy.golang.org
Top 1.0% dependent packages on proxy.golang.org
Top 0.7% dependent repos on proxy.golang.org
Top 0.1% docker downloads on proxy.golang.org

proxy.golang.org : aead.dev/mem

Package mem provides functionality for measuring and displaying memory throughput and capacity. Package mem defines two different types that represent quantities of data - Size and BitSize. The former represents an amount of data as bytes while the later represents an amount of data as bits. Not each BitSize can be represented as Size and vice versa. For example 65 bit is neither 8 bytes (64 bit) nor 9 bytes (72 bit). However, Size and BitSize provide APIs for converting one to the other. Some computer metrics, like networking speed, are usually measured in bits while others, like storage capacity, are measured in bytes. Large quantities of bits / bytes are commonly displayed using the decimal prefixes for powers of 10. However, some systems use binary prefixes (2^10 = 1024). Sizes can be formatted and displayed in various units and with various precisions. For example: String representation of sizes can be parsed using the corresponding Parse functions. For example: Often, code has to pre-allocate a buffer of a certain size or limit the amount of data from an io.Reader. With the mem package this can be done in a human readable way. For example:

Registry - Source - Documentation - JSON
purl: pkg:golang/aead.dev/mem
License: MIT
Latest release: over 1 year ago
First release: over 1 year ago
Namespace: aead.dev
Dependent packages: 35
Dependent repositories: 65
Stars: 1 on GitHub
Forks: 0 on GitHub
Docker dependents: 80
Docker downloads: 1,413,772,926
See more repository details: repos.ecosyste.ms
Last synced: 12 days ago

    Loading...
    Readme
    Loading...