-
-
Notifications
You must be signed in to change notification settings - Fork 2
Create memory-bytes-for-each-file.md #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
bc3693c
e24d469
b20ee27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||||||||||||||||||||||
| ## How many bytes is enough for creating the file unit precisely | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| To know how many memory is enough for that file, you need to think how many charcaters or punctuation is inserted in the document like word | ||||||||||||||||||||||||||
| that needs to be stored in the file you were writing. For instance, think of it like how many charcaters are there in the, 3 characters right because | ||||||||||||||||||||||||||
| they are t, h, and e that forms the whole word "the". The same thing for computers, they read by how many digits or charcaters that form the whole word | ||||||||||||||||||||||||||
| in the end. Use regular bytes for very simple projects like for example, the file has only a 160 * 120 screen in total are and store all the bits per pixel | ||||||||||||||||||||||||||
| filling the screen by doing this because it is simple, it is just storing individual bits into the screen. | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The content of this new file has several grammatical errors, typos (e.g., 'charcaters'), and unclear phrasing that make it difficult to understand. The title is also a bit awkward. I recommend rewriting the content to be more clear, concise, and grammatically correct.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The 160×120 example suggests storing “individual bits” for the screen, which is only correct for a 1‑bit monochrome framebuffer. Most displays use at least 8‑ or 16‑bit color, so memory sizing must be Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This explanation equates file size to the number of “characters,” which only holds for single‑byte encodings and ASCII‑only content. If a reader stores any non‑ASCII text (e.g., accented letters, emoji, or non‑Latin scripts) in UTF‑8, each character can take multiple bytes, so counting characters will underestimate required memory. Consider explicitly stating that bytes per character depend on the file’s encoding and content.
Useful? React with 👍 / 👎.