Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,34 @@
# frozen_string_literal: true
require "zlib"
require_relative "constants"
module Unicode
class DisplayWidth
File.open(INDEX_FILENAME, "rb") do |file|
serialized_data = Zlib::GzipReader.new(file).read
serialized_data.force_encoding Encoding::BINARY
INDEX = Marshal.load(serialized_data)
end
def self.decompress_index(index, level)
index.flat_map{ |value|
if level > 0
if value.instance_of?(Array)
value[15] ||= nil
decompress_index(value, level - 1)
else
decompress_index([value] * 16, level - 1)
end
else
if value.instance_of?(Array)
value[15] ||= nil
value
else
[value] * 16
end
end
}
end
end
end