diff --git a/lib/simplecov-html.rb b/lib/simplecov-html.rb
index 61508d8..1e8703e 100644
--- a/lib/simplecov-html.rb
+++ b/lib/simplecov-html.rb
@@ -93,6 +93,7 @@ def assets_path(name)
def asset_inline(name)
path = File.join(@public_assets_dir, name)
+ # Equivalent to `Base64.strict_encode64(File.read(path))` but without depending on Base64
base64_content = [File.read(path)].pack("m0")
content_type = CONTENT_TYPES[File.extname(name)]