Blyx Nest Blyx language
Registry / Library
library · v0.1.0

CoalesceIO

Count merged reads and extra gap bytes for sorted byte requests.

Source repository · Package JSON

Use CoalesceIO

use vendor::coalesceio::coalesceio;

Run the example

nest demo coalesceio@0.1.0
blyxc native-run coalesceio-demo/main.blyx
Example source and expected output
use vendor::coalesceio::coalesceio;

fn main() {
    let starts = [0, 5, 20];
    let lengths = [4, 3, 2];
    let gap = 1.0;
    let result = coalesceio_plan(starts, lengths, gap);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

2
10
1

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP66cfd6c94290b0336505469934aebc4e6a118f60486193ce47615e7ff9ae5dfea478e8b1dc