ku4es-data

kodmunki Utilities for ECMAScript Data

Usage no npm install needed!

<script type="module">
  import ku4esData from 'https://cdn.skypack.dev/ku4es-data';
</script>

README

Classes

BinaryFile

Functions

readExif(file)Object

Read the EXIF data out of a valid BinaryFile.

BinaryFile

Kind: global class

new BinaryFile(byteString)

A binary file abstraction that exposes methods for reading data from a binary file.

Param Description
byteString a binary byte string

binaryFile.getByteAt(index) ⇒ Number

Return the byte value at index

Kind: instance method of BinaryFile
Access: public

Param Type
index number

binaryFile.getLength() ⇒ *

Return the length of the file

Kind: instance method of BinaryFile
Access: public

binaryFile.getStringAt(a, b) ⇒ string

Return string value starting at position a of length b

Kind: instance method of BinaryFile
Access: public

Param Type
a number
b number

binaryFile.getShortAt(offset, isBigEndian) ⇒ *

Return the short value at offset

Kind: instance method of BinaryFile
Access: public

Param Type
offset number
isBigEndian Boolean

binaryFile.getLongAt(offset, isBigEndian) ⇒ *

Return the long value at offset

Kind: instance method of BinaryFile
Access: public

Param Type
offset number
isBigEndian Boolean

binaryFile.getSLongAt(offset, isBigEndian) ⇒ number

Return the signed long value at offset

Kind: instance method of BinaryFile
Access: public

Param Type
offset number
isBigEndian Boolean

readExif(file) ⇒ Object

Read the EXIF data out of a valid BinaryFile.

Kind: global function

Param Type Description
file BinaryFile A valid JPEG BinaryFile