vortex-zigzag 0.69.0

Vortex zig zag array
Documentation
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

use std::ops::Range;

use vortex_array::ArrayRef;
use vortex_array::ArrayView;
use vortex_array::IntoArray;
use vortex_array::arrays::slice::SliceReduce;
use vortex_error::VortexResult;

use crate::ZigZag;
use crate::array::ZigZagArrayExt;

impl SliceReduce for ZigZag {
    fn slice(array: ArrayView<'_, Self>, range: Range<usize>) -> VortexResult<Option<ArrayRef>> {
        Ok(Some(
            ZigZag::try_new(array.encoded().slice(range)?)?.into_array(),
        ))
    }
}