class

Crowbar::Selectors::Stride

Inherits Crowbar::Selector < Reference < Object

Selects periodic byte slices at regular intervals (e.g. every 4th byte, alternating words, audio samples).

Constructors

new(step : Int32, offset : Int32 = 0, length : Int32 = 1, weight : Float64 = 1.0)
Source

Instance methods

length
Source
offset
Source
select(buffer : Buffer) : Array(Tuple(Int32, Int32))

Returns an array of target ranges {start_index, end_index_exclusive}

Source
step
Source