aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-30 00:19:48 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-20 17:50:22 +0200
commit60dc37269cd2dc8cdf23d9f77680f6af9490032f (patch)
tree9a72ba24daffa546f92704e7e06cf84fded2d89d /src/utils
parenta146a22b11cea39bc691417d9d9a1292b7177552 (diff)
downloadchawan-60dc37269cd2dc8cdf23d9f77680f6af9490032f.tar.gz
img, loader: separate out png codec into cgi, misc improvements
* multi-processed and sandboxed PNG decoding & encoding (through local CGI) * improved request body passing (including support for output id as response body) * simplified & faster blob()/text() - now every request starts suspended, and OngoingData.buf has been replaced with loader's buffering capability * image caching: we no longer pull bitmaps from the container after every single getLines call Next steps: replace our bespoke PNG decoder with something more usable, add other decoders, and make them stream.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 8171010a..3744d9e2 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -291,6 +291,9 @@ func parseOctUInt32*(s: string; allowSign: static bool): Option[uint32] =
func parseHexUInt32*(s: string; allowSign: static bool): Option[uint32] =
return parseUIntImpl[uint32](s, allowSign, AsciiHexDigit, 16)
+func parseUInt64*(s: string; allowSign: static bool): Option[uint64] =
+ return parseUIntImpl[uint64](s, allowSign)
+
#TODO not sure where this algorithm is from...
# (probably from CSS)
func parseFloat64*(s: string): float64 =