Skip to content

Instantly share code, notes, and snippets.

Hello World !

Franck Freiburger FranckFreiburger

Hello World !
View GitHub Profile
FranckFreiburger / duplexify.mjs
Last active Aug 27, 2020
nodejs readable and writable stream to duplex stream
View duplexify.mjs
import { Duplex } from 'stream'
export default class Duplexify extends Duplex {
constructor(writable, readable) {
readableObjectMode: readable.readableObjectMode,
writableObjectMode: writable.writableObjectMode,
readableHighWaterMark: readable.readableHighWaterMark,
FranckFreiburger / getJpegQuality.js
Created Oct 4, 2018
pure JavaScript jpeg quality value recover
View getJpegQuality.js
// javascript jpeg decoder:
// Determine the JPEG compression quality from the quantization tables:
// JPEG File Layout and Format:
// jpeg constants:
function getQuantizationTables(data) {
var quantizationTables = []
var dctZigZag = new Int32Array([