ctucx.git: nimjpg

parse jpg file header

commit eb52a606f9aa6d5317e2b9adc37dc92d79ca11c6
parent 6c2b1b777bc3903930a7e28d0f5800c2e72ab2ab
Author: Milan Pässler <milan@petabyte.dev>
Date: Sat, 13 Mar 2021 15:11:18 +0100

install utils.nim
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/jpgnim.nimble b/jpgnim.nimble
@@ -6,7 +6,7 @@ description   = "Read jpg headers"
 license       = "GPL-3.0"
 srcDir        = "./"
 bin           = @["example", "example_sync"]
-installFiles  = @["jpgnim.nim"]
+installFiles  = @["jpgnim.nim", "utils.nim"]
 
 # Dependencies
 requires "nim >= 1.4"
diff --git a/utils.nim b/utils.nim
@@ -8,6 +8,9 @@ template error*(x: varargs[untyped]) =
   echo(x)
   quit(1)
 
+# These are shim functions to make a Stream usable like an AyncFile
+# This is so we can use the multisync macro
+
 proc read*(stream: Stream, length: int): string =
   return stream.readStr(length)