2022-05-19 19:56:03 +00:00
|
|
|
## Nim-Codex
|
2022-04-05 19:12:59 +00:00
|
|
|
## Copyright (c) 2022 Status Research & Development GmbH
|
|
|
|
## Licensed under either of
|
|
|
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
## at your option.
|
|
|
|
## This file may not be copied, modified, or distributed except according to
|
|
|
|
## those terms.
|
|
|
|
|
|
|
|
import ./erasure/erasure
|
|
|
|
import ./erasure/backends/leopard
|
|
|
|
|
|
|
|
export erasure
|
|
|
|
|
2023-06-22 15:11:18 +00:00
|
|
|
func leoEncoderProvider*(
|
|
|
|
size, buffers, parity: int
|
|
|
|
): EncoderBackend {.raises: [Defect].} =
|
|
|
|
## create new Leo Encoder
|
2022-04-05 19:12:59 +00:00
|
|
|
LeoEncoderBackend.new(size, buffers, parity)
|
|
|
|
|
2023-06-22 15:11:18 +00:00
|
|
|
func leoDecoderProvider*(
|
|
|
|
size, buffers, parity: int
|
|
|
|
): DecoderBackend {.raises: [Defect].} =
|
|
|
|
## create new Leo Decoder
|
|
|
|
LeoDecoderBackend.new(size, buffers, parity)
|