UNPKG

@hiraokahypertools/pst_to_msg

Version:

Convert a message in Outlook PST file into MSG format

35 lines 880 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toHex4 = toHex4; exports.toHex2 = toHex2; const hexLo = "0123456789abcdef"; const hexHi = "0123456789ABCDEF"; /** * little uint32 to hex string * * @internal */ function toHex4(value, upper) { const tbl = upper ? hexHi : hexLo; return (tbl[(value >> 28) & 15] + tbl[(value >> 24) & 15] + tbl[(value >> 20) & 15] + tbl[(value >> 16) & 15] + tbl[(value >> 12) & 15] + tbl[(value >> 8) & 15] + tbl[(value >> 4) & 15] + tbl[value & 15]); } /** * little uint16 to hex string * * @internal */ function toHex2(value, upper) { const tbl = upper ? hexHi : hexLo; return (tbl[(value >> 12) & 15] + tbl[(value >> 8) & 15] + tbl[(value >> 4) & 15] + tbl[value & 15]); } //# sourceMappingURL=utils.js.map