How to use the decode function from bindings

Find comprehensive JavaScript bindings.decode code examples handpicked from public code repositorys.

14
15
16
17
18
19
20
21
22
23
24
25
function decode(data) {
  if (!(data instanceof Buffer)) {
    throw new Error('Input data must be a buffer');
  }


  return bindings.decode(data);
}


module.exports = {
  encode,
fork icon1
star icon2
watch icon0

+ 2 other calls in file

36
37
38
39
40
41
42
43
44
45
  width: number;
  height: number;
  channels: QOIChannels;
  colorspace: QOIColorSpace;
} {
  const result = addon.decode(data, convertChannels || 0);
  if (convertChannels !== undefined) result.channels = convertChannels;

  return result;
}
fork icon0
star icon2
watch icon1

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)