We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f412c4 commit 15b03acCopy full SHA for 15b03ac
1 file changed
lib/pgvector/bit.rb
@@ -13,8 +13,8 @@ def self.from_text(string)
13
end
14
15
def self.from_binary(string)
16
- length = string[..3].unpack1("l>")
17
- Bit.new(string[4..].unpack("B*").join[...length])
+ length, data = string.unpack("l>B*")
+ Bit.new(data[...length])
18
19
20
def to_s
0 commit comments