diff --git a/src/Server/Memory/Bytes.php b/src/Server/Memory/Bytes.php
index <HASH>..<HASH> 100644
--- a/src/Server/Memory/Bytes.php
+++ b/src/Server/Memory/Bytes.php
@@ -83,6 +83,10 @@ final class Bytes
 
     public static function fromString(string $bytes): self
     {
+        if ($bytes === (string) (int) $bytes) {
+            return new self((int) $bytes);
+        }
+
         $bytes = new Str($bytes);
 
         if ($bytes->length() < 2) {
diff --git a/tests/Server/Memory/BytesTest.php b/tests/Server/Memory/BytesTest.php
index <HASH>..<HASH> 100644
--- a/tests/Server/Memory/BytesTest.php
+++ b/tests/Server/Memory/BytesTest.php
@@ -76,6 +76,7 @@ class BytesTest extends TestCase
     public function strings(): array
     {
         return [
+            ['42', '42B'],
             ['42B', '42B'],
             ['42Bi', '42B'],
             ['42K', '42KB'],
allow to build bytes from string when int  wrapped in a string