package numcodecs:abc@0.1.1; interface codec { type json = string; type json-schema = json; type usize = u32; record any-array { data: any-array-data, shape: list, } @since(version = 0.1.1) record any-array-prototype { dtype: any-array-dtype, shape: list, } variant any-array-data { %u8(list), %u16(list), %u32(list), %u64(list), i8(list), i16(list), i32(list), i64(list), %f32(list), %f64(list), } @since(version = 0.1.1) enum any-array-dtype { %u8, %u16, %u32, %u64, i8, i16, i32, i64, %f32, %f64, } record error { message: string, chain: list, } resource codec { from-config: static func(config: json) -> result; encode: func(data: any-array) -> result; decode: func(encoded: any-array) -> result; @since(version = 0.1.1) decode-into: func(encoded: any-array, decoded: any-array-prototype) -> result; get-config: func() -> result; } codec-id: func() -> string; codec-config-schema: func() -> json-schema; }