2 # frozen_string_literal: true
3 Warning[:experimental] = false
4 string = "The quick brown fox jumped over the lazy dog."
5 buffer = IO::Buffer.for(string)
6 format = [:U32, :U32, :U32, :U32]
11 string.unpack1("N", offset: 4),
12 string.unpack1("N", offset: 8),
13 string.unpack1("N", offset: 12),
17 buffer.get_value(:U32, 0),
18 buffer.get_value(:U32, 4),
19 buffer.get_value(:U32, 8),
20 buffer.get_value(:U32, 12),
23 buffer.get_values(format, 0)