mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-19 01:12:34 +00:00
misc
This commit is contained in:
parent
df684302f6
commit
d3c0667616
@ -11,19 +11,18 @@ type
|
||||
RandomChunker* = Chunker
|
||||
|
||||
proc new*(
|
||||
T: type RandomChunker,
|
||||
rng: Rng,
|
||||
chunkSize: int | NBytes,
|
||||
size: int | NBytes,
|
||||
pad = false
|
||||
): RandomChunker =
|
||||
T: type RandomChunker,
|
||||
rng: Rng,
|
||||
chunkSize: int | NBytes,
|
||||
size: int | NBytes,
|
||||
pad = false): RandomChunker =
|
||||
## Create a chunker that produces random data
|
||||
##
|
||||
|
||||
let
|
||||
size = size.int
|
||||
chunkSize = chunkSize.NBytes
|
||||
|
||||
|
||||
var consumed = 0
|
||||
proc reader(data: ChunkBuffer, len: int): Future[int]
|
||||
{.async, gcsafe, raises: [Defect].} =
|
||||
|
Loading…
x
Reference in New Issue
Block a user