Diff

util/bit53.lua @ 10241:48f7cda4174d

util.bitops: Library to find appropriate bitwise library (closes #1395)
author Kim Alvefur <zash@zash.se>
date Mon, 22 Jul 2019 01:58:57 +0200
child 12358:d77d8fba44ad
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util/bit53.lua	Mon Jul 22 01:58:57 2019 +0200
@@ -0,0 +1,7 @@
+-- Only the operators needed by net.websocket.frames are provided at this point
+return {
+	band   = function (a, b) return a & b end;
+	bor    = function (a, b) return a | b end;
+	bxor   = function (a, b) return a ~ b end;
+};
+