Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/fileBytes.md → docs/developers/fileBytes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## How Many Bytes Does a File Need?
## Bytes for a File

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep npm files list in sync with renamed doc path

After moving this document to docs/developers/fileBytes.md, the package manifest still lists the old path (package.json files entry docs/fileBytes.md), so the renamed doc is no longer shipped in published tarballs. I verified with npm pack --dry-run in this repo: docs/developers/fileBytes.md is absent from the output. Any consumer expecting this doc in the package will now miss it until the manifest is updated.

Useful? React with 👍 / 👎.

To determine how much memory a file requires, you need to consider its contents.
For example, in a text file, the size is determined by the number of characters (including spaces and punctuation). Each character typically requires one or more bytes of storage.
For other types of files, like images, the calculation is different. For an image on a 160x120 pixel screen, the total memory needed would be the total number of pixels (160 * 120) multiplied by the number of bytes required to store the color of each pixel (which depends on the bits per pixel, or BPP).
Loading