<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hossein Naseri</title>
    <description>The latest articles on DEV Community by Hossein Naseri (@ho3na3).</description>
    <link>https://dev.to/ho3na3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3947473%2F82c08dd7-c4a7-4c2a-8028-bef2f43e959f.jpg</url>
      <title>DEV Community: Hossein Naseri</title>
      <link>https://dev.to/ho3na3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ho3na3"/>
    <language>en</language>
    <item>
      <title>How Does File Compression Work?</title>
      <dc:creator>Hossein Naseri</dc:creator>
      <pubDate>Sun, 14 Jun 2026 13:26:08 +0000</pubDate>
      <link>https://dev.to/ho3na3/how-does-file-compression-work-19od</link>
      <guid>https://dev.to/ho3na3/how-does-file-compression-work-19od</guid>
      <description>&lt;h1&gt;
  
  
  How Does File Compression Work?
&lt;/h1&gt;

&lt;p&gt;Compression is a way to reduce a file's size.&lt;/p&gt;

&lt;p&gt;To understand it, imagine you're asked to count the cars in a parking lot.&lt;/p&gt;

&lt;p&gt;You could report:&lt;/p&gt;

&lt;p&gt;a BMW&lt;/p&gt;

&lt;p&gt;a BENZ&lt;/p&gt;

&lt;p&gt;a BENZ&lt;/p&gt;

&lt;p&gt;a BMW&lt;/p&gt;

&lt;p&gt;a FORD&lt;/p&gt;

&lt;p&gt;a BMW&lt;/p&gt;

&lt;p&gt;a FORD&lt;/p&gt;

&lt;p&gt;Or, if you wanted to send the shortest report possible, you could simply say:&lt;/p&gt;

&lt;p&gt;3 BMW&lt;/p&gt;

&lt;p&gt;2 BENZ&lt;/p&gt;

&lt;p&gt;2 FORD&lt;/p&gt;

&lt;p&gt;It's the same information, but it takes less space.&lt;/p&gt;

&lt;p&gt;That's the basic idea behind many compression techniques: find repeating patterns and store them more efficiently.&lt;/p&gt;

&lt;p&gt;Every file on your phone or computer is ultimately stored as a long sequence of tiny ON and OFF states, usually represented as 0s and 1s.&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;000000111111111010100000100000010010000001010111111111
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of storing every digit individually, the computer can look for repeated patterns.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;00000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;becomes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 zeros
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;11111
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;becomes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 ones
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So our data could be represented like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(6 zeros)(8 ones)0101(5 zeros)1(6 zeros)1001(6 zeros)1010(8 ones)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, if we represented those 0s and 1s visually, it might look something like this:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjktecxa74ivjdax3gi72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjktecxa74ivjdax3gi72.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rather than storing every individual digit, the computer stores a shorter description of repeating patterns.&lt;/p&gt;

&lt;p&gt;This is one of the simplest forms of compression.&lt;/p&gt;

&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Store the same information using less space.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Smaller files take up less storage, travel across the internet faster, and use less bandwidth.&lt;/p&gt;

&lt;p&gt;Real compression algorithms are much smarter than this example, but they all follow the same basic idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't store repetition. Store a shorter description of it instead.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>compression</category>
      <category>beginners</category>
      <category>computerscience</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>What are Typed Arrays in JavaScript?</title>
      <dc:creator>Hossein Naseri</dc:creator>
      <pubDate>Wed, 03 Jun 2026 13:13:53 +0000</pubDate>
      <link>https://dev.to/ho3na3/what-are-typed-arrays-in-javascript-342p</link>
      <guid>https://dev.to/ho3na3/what-are-typed-arrays-in-javascript-342p</guid>
      <description>&lt;p&gt;An array in JavaScript is like a big, messy room or warehouse where you can store anything: tables, random-sized boxes, bags, etc.&lt;br&gt;
Or technically: strings, numbers, objects, or even other arrays.&lt;/p&gt;

&lt;p&gt;This flexibility is awesome, but it comes with a cost: &lt;br&gt;
the array can &lt;strong&gt;become slow&lt;/strong&gt; and &lt;strong&gt;inefficient&lt;/strong&gt; when it gets large.🐌&lt;/p&gt;

&lt;p&gt;Imagine trying to find one specific box in a chaotic room full of different-sized items. You have to search through everything.&lt;br&gt;
Now imagine you have a separate, well-organized room where every box is the same size and contains only one type of item.&lt;br&gt;
You can go straight to the exact spot and grab what you need super fast!🏎️&lt;/p&gt;

&lt;h3&gt;
  
  
  This is the main idea behind Typed Arrays.
&lt;/h3&gt;

&lt;p&gt;Typed arrays are special arrays where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every element must be a number of a fixed size (8-bit, 16-bit, 32-bit, etc.).&lt;/li&gt;
&lt;li&gt;The size and type of each element is decided when you create the array.&lt;/li&gt;
&lt;li&gt;They are designed for high performance and working with binary data (raw bytes).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why do we use Typed Arrays?
&lt;/h3&gt;

&lt;p&gt;Computers love perfectly organized data! Typed Arrays give them exactly that with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Super Speed&lt;/strong&gt;: Because the computer knows exactly what kind of data is inside and how much space each item takes, it can read, write, and process the data &lt;strong&gt;much faster&lt;/strong&gt;. This is very important for &lt;strong&gt;games, video, audio, graphics,&lt;/strong&gt; and large data processing.⚡&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory Efficiency&lt;/strong&gt;: Regular JavaScript arrays waste memory. Typed Arrays use the smallest possible amount of memory by storing raw binary data directly.📦&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct access to binary data&lt;/strong&gt;: They are perfect for working with &lt;strong&gt;files, images, audio, 3D models, WebGL, WebSockets&lt;/strong&gt;, and more.🌐&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common Types of Typed Arrays:
&lt;/h3&gt;

&lt;p&gt;Here are the most commonly used Typed Arrays:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Typed Array&lt;/th&gt;
&lt;th&gt;Stores&lt;/th&gt;
&lt;th&gt;Size per element&lt;/th&gt;
&lt;th&gt;Common Use Cases&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Uint8Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whole numbers 0 to 255&lt;/td&gt;
&lt;td&gt;8 bits (1 byte)&lt;/td&gt;
&lt;td&gt;Images, colors, binary files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Int8Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Numbers from -128 to 127&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;Small signed values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Uint16Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whole numbers 0 to 65,535&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;Audio samples, larger values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Int16Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Numbers from -32,768 to 32,767&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;Audio, sensor data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Uint32Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whole numbers 0 to 4.29 billion&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;Large counters, graphics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Int32Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Numbers from -2.1B to 2.1B&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;General math, coordinates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Float32Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Decimal numbers (e.g., 3.14159)&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;3D positions, physics, graphics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Float64Array&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;High-precision decimal numbers&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;Scientific calculations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Uint8Array&lt;/code&gt;&lt;/strong&gt; is the most commonly used, especially when starting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Example📝
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Regular array (flexible but slower for big data)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;normal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.14&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// Typed Array - only numbers 0-255&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pixels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; 

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pixels&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;     &lt;span class="c1"&gt;// 255&lt;/span&gt;
&lt;span class="nx"&gt;pixels&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// works&lt;/span&gt;
&lt;span class="c1"&gt;// pixels[1] = "hello";     // Won't work! Converts to 0 because it only allows numbers.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Points to Remember:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Typed Arrays have a fixed size once created.🎯&lt;/li&gt;
&lt;li&gt;They can only store numbers of one specific type.&lt;/li&gt;
&lt;li&gt;They are significantly faster and more memory-efficient than regular arrays when working with large amounts of data.&lt;/li&gt;
&lt;li&gt;In Node.js, &lt;strong&gt;Buffer&lt;/strong&gt; is commonly used and is built on top of &lt;strong&gt;Uint8Array&lt;/strong&gt;.
-💡 Bonus Tip (Under the Hood): Typed Arrays don't actually hold the data themselves. They are just a "view" looking inside a raw chunk of memory called an ArrayBuffer.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>programmers</category>
      <category>architecture</category>
    </item>
    <item>
      <title>What Exactly Encription is?</title>
      <dc:creator>Hossein Naseri</dc:creator>
      <pubDate>Wed, 27 May 2026 21:09:32 +0000</pubDate>
      <link>https://dev.to/ho3na3/what-exactly-encription-is-273g</link>
      <guid>https://dev.to/ho3na3/what-exactly-encription-is-273g</guid>
      <description>&lt;p&gt;When you open messaging apps like WhatsApp, you probably see alerts like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your messages are end-to-end encrypted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But what does encryption actually mean?&lt;/p&gt;

&lt;p&gt;What really happens technically when you send a message?&lt;/p&gt;

&lt;h2&gt;
  
  
  Imagine This Scenario
&lt;/h2&gt;

&lt;p&gt;Suppose I want to send a secret message to my friend.&lt;/p&gt;

&lt;p&gt;Before sending anything, I secretly tell my friend:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To understand my messages, move every letter one step backward in the alphabet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So if my friend sees:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They know it actually means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A → B
B → C
C → D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every letter is shifted by one.&lt;/p&gt;

&lt;p&gt;Now suppose my real message is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HELLO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before sending it, I transform every letter using the same rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H → I
E → F
L → M
L → M
O → P
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the encrypted message becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IFMMP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I give YOU the paper containing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IFMMP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and ask you:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Take this to my friend.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If someone steals the paper while you are carrying it, they will only see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IFMMP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which looks meaningless unless they know the secret rule.&lt;/p&gt;

&lt;p&gt;My friend, however, already knows the rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Move every letter one step backward.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So they can decode the message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I → H
F → E
M → L
M → L
P → O
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and recover:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HELLO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That secret rule is basically the key.&lt;/p&gt;

&lt;h2&gt;
  
  
  This Is Basically Encryption
&lt;/h2&gt;

&lt;p&gt;Encryption means:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Transforming readable information into another form using a secret rule or key.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The original readable message is called:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Plain Text&lt;/code&gt;&lt;br&gt;
And the transformed unreadable version is called:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Cipher Text&lt;/code&gt;&lt;br&gt;
So in our example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HELLO  → Plain Text
IFMMP  → Cipher Text
But Computers Do Not Understand Letters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Computers do not actually understand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H
E
L
O
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Computers only understand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bits
0s
1s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As we explained in the previous article, every character inside a computer becomes a number.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H = 72
E = 69
L = 76
O = 79

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And those numbers themselves become binary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;72 = 01001000
69 = 01000101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So inside a computer, your messages are really just numbers and bits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Encryption Inside Computers
&lt;/h2&gt;

&lt;p&gt;So inside a computer, your messages are really just numbers and bits.&lt;/p&gt;

&lt;p&gt;Encryption at the computer level is basically taking those numbers and transforming them into other numbers using a reversible mathematical rule.&lt;/p&gt;

&lt;p&gt;In simple words:&lt;/p&gt;

&lt;p&gt;The computer changes the original numbers into different numbers in a way that can later be reversed using the correct key or formula.&lt;/p&gt;

&lt;p&gt;For example, imagine we have a number like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In binary, that becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;00000001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, suppose the computer applies a secret rule like:&lt;/p&gt;

&lt;p&gt;add 5&lt;/p&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 + 5 = 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now the stored value becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;00000110
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Someone looking at the encrypted value only sees:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;not the original:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To recover the original value, the receiver uses the reverse operation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;6 - 5 = 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the original data comes back again.&lt;/p&gt;

&lt;p&gt;Modern encryption systems are much more advanced than simple addition and subtraction, but the core idea is still similar:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- take original data&lt;/li&gt;
&lt;li&gt;- transform it using mathematics&lt;/li&gt;
&lt;li&gt;- Use a secret key&lt;/li&gt;
&lt;li&gt;- and make it unreadable without the correct way to reverse it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That transformed unreadable data is what we call:&lt;br&gt;
&lt;strong&gt;Encrypted Data&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>security</category>
      <category>programming</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>What Are Buffers, Really?</title>
      <dc:creator>Hossein Naseri</dc:creator>
      <pubDate>Sat, 23 May 2026 11:47:56 +0000</pubDate>
      <link>https://dev.to/ho3na3/what-are-buffers-290m</link>
      <guid>https://dev.to/ho3na3/what-are-buffers-290m</guid>
      <description>&lt;p&gt;Buffers are &lt;strong&gt;temporary memory spaces&lt;/strong&gt; used to hold data while it is being moved from one place to another.&lt;/p&gt;

&lt;p&gt;Think of it like eating rice.&lt;/p&gt;

&lt;p&gt;You cannot move the entire plate of rice into your stomach at once.&lt;br&gt;
So you use a spoon.&lt;/p&gt;

&lt;p&gt;The spoon temporarily holds a small piece of rice,&lt;br&gt;
moves it,&lt;br&gt;
Then it gets filled again.&lt;/p&gt;

&lt;p&gt;In computers, buffers work similarly.&lt;/p&gt;

&lt;p&gt;Instead of moving huge amounts of data all at once, computers usually &lt;em&gt;move data in smaller chunks&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A buffer temporarily stores those chunks while data is being:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;copied&lt;/li&gt;
&lt;li&gt;read&lt;/li&gt;
&lt;li&gt;written&lt;/li&gt;
&lt;li&gt;uploaded&lt;/li&gt;
&lt;li&gt;downloaded&lt;/li&gt;
&lt;li&gt;streamed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;while reading a file&lt;/li&gt;
&lt;li&gt;while streaming a video&lt;/li&gt;
&lt;li&gt;while receiving internet packets&lt;/li&gt;
&lt;li&gt;while copying data between memory and disk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Buffers help data &lt;strong&gt;move smoothly and efficiently&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Buffer Technically?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Buffer 4C A1 33 00 00 ...&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A buffer is a block of raw binary data stored in memory.&lt;/p&gt;

&lt;p&gt;You can think of it as a list of very small memory units called bytes.&lt;/p&gt;

&lt;p&gt;Each item inside a buffer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;has exactly &lt;strong&gt;8 bits&lt;/strong&gt; (1 byte)&lt;/li&gt;
&lt;li&gt;stores a small piece of data&lt;/li&gt;
&lt;li&gt;can be read, changed, copied, or written&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;4C A1 33 00&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Each pair represents &lt;strong&gt;one byte&lt;/strong&gt; of data written in **hexadecimal **format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why and What Is Hexadecimal?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;We will learn more about hexadecimal later, but for now, here is the basic idea.&lt;/em&gt;&lt;br&gt;
Computers internally work with binary numbers:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;01001100 01001100 01001100 01001100&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
But binary is difficult for humans to read and understand quickly.&lt;/p&gt;

&lt;p&gt;Imagine looking at thousands of bytes written only with 0s and 1s.&lt;br&gt;
It becomes confusing very fast.&lt;/p&gt;

&lt;p&gt;So programmers use hexadecimal instead.&lt;/p&gt;

&lt;p&gt;Hexadecimal is simply a shorter and cleaner way to represent binary data.&lt;/p&gt;

&lt;p&gt;For example, instead of writing:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;01001100&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
we can write:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;4C&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Both represent the same data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple Mental Model
&lt;/h2&gt;

&lt;p&gt;Think of a buffer like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[ byte ][ byte ][ byte ][ byte ]&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Each box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;contains 8 bits&lt;/li&gt;
&lt;li&gt;stores a tiny piece of data&lt;/li&gt;
&lt;li&gt;together forms larger information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the core idea behind buffers.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>computerscience</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
