Skip to content

Instantly share code, notes, and snippets.

@tscholl2
tscholl2 / LZW.js
Last active August 19, 2020 14:38
Some types of compression in js
(() => {
const fcp = String.fromCodePoint;
const L = "length";
/**
* @param {Uint8Array} input
* @returns {Uint8Array}
*/
function compress(input) {
const codewords = [];
const dictionary = new Map();
@tscholl2
tscholl2 / main.go
Created August 17, 2020 16:05
AWS lambda example in Go
// Testrun with:
// go build *.go && docker run --rm -v "$PWD":/var/task lambci/lambda:go1.x main '{"prefix":"23727483927892"}'
// Deploy by:
// zip main.zip main
// upload main.zip to https://console.aws.amazon.com/lambda/home
package main
import (
"context"