How to use heatshrink - 10 common examples

To help you get started, we’ve selected a few heatshrink examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nearform / nceubadge2018 / js / badge.js View on Github external
Badge.apps["Map"] = function() {
  var mapImg = {
    width: 128,
    height: 64,
    bpp: 1,
    transparent: 0,
    buffer: require("heatshrink").decompress(
      atob(
        "AH4A/AAcD/4AD/ANGgP//wFCgkAh//+APFgESBoQBBhFEiAPID4YPLD6sUoAfMvkVB5AfFi/AH7cP4/0H5sAJ5I/EgA/GqtSD4x/OD44/JD7w/fio/11XyH51CH5wPBH5ofHV44fHF5IfM//D/4AF+A/KAAcTF5QADJ5IAFJ5YADP5YvEoBfF4QPGioPFgECH5wPHH48D//gGoSPIn7/BkAVCoCwBB4sgiQPgn48BB5gADB/4PIR4QADv/4WwwAPwAPdgfq93oB5cB5WkxAgMx2k5APMhQfOhXk9wMJA"
      )
    )
  };
  var ROOMS = [
    // [Name,X,Y]
    ["Unknown"], // 0,
    ["McCurdy 12", 53, 22], // 1,
    ["McCurdy 3", 76, 22], // 2,
    ["Maginnes", 29, 20], // 3,
    ["Preassembly", 70, 41], // 4,
    ["Lounge"], //  5,
    ["Hotel Bar"], // 6,
    ["Restaurant"], // 7,
    ["Hotel Checkin"], // 8,
github espruino / BangleApps / apps / horsey / horse-race.js View on Github external
Bangle.setLCDMode("doublebuffered");
var img = {
  width : 48, height : 48, bpp : 8,
  transparent : 254,
  buffer : require("heatshrink").decompress(atob("/wA/AH4A/ACl5p9PvIutp9V0YvpFwV553OFlIAC44vnFwtPFwJfnGIl55vNX1dVsQQMvQvdsQADHpd6AYIvnTgd6F4QxbF4gwFfYgvBGAYvbnAyGFwiOBAAVVLzlcrgvEqxeHAAQvdm4vPlYwZF4gHCrguFqxfFF6QWGF44tERw4wSC467DrgOCFxAZGFhhHKGAgxBRoiMEPRItJFxQABwAxDF4VVLBIGCmQuLRpAwFF4i4MLxwvNL4VcvSLEdCaoDF5iODBxQvfRoeAF7wwLRogvgGBYucF47yNF9FVqwuNqoaDeCQvHBQNVFxYbGYDFWfhx8HMCQfRXoowRF5KtBDpbtGMCgdFPpovcDgh7OF7JMGF87cWCY4vPDZZgQlgABF6qaIIhwveYKQvaVp4wYOo59ORioYEDIreOdqwA/AH4A2A"))
};
// ideally we'd just load the image file but it looks like NodeConf
// Bangle.js firmware had bug which meant that transparency in image
// strings wasn't used
//var img = require("Storage").read("*horsey");
var mycounter = 0;
var players = {};
setWatch(x=>{
  mycounter++;
  updateAdvertising();
},BTN1,{repeat:true});

function updateAdvertising() {
try {
  NRF.setAdvertising({},{
    manufacturer: 0x0590,
github espruino / BangleApps / apps / blobclk / clock-blob-icon.js View on Github external
require("heatshrink").decompress(atob("mEwwhC/AH4AUmYAOCw0DC58wFyowHC/4X/C9mIxAGKC5IPBCIoXWnAXOB4ODAQQXTGQQXCJoyPMC4ggDC6IVBC6JKFC6JZDC6SODCgQXQFwalCSAoXJXAgXSdo4XOCIi/CL54XvABwX/C/4XtgYWPmAXFGCAWGAH4A/ABgA="))
github espruino / BangleApps / apps / mclock / clock-morphing-icon.js View on Github external
require("heatshrink").decompress(atob("mEwghC/AE8IxAAEwAWVDB4WIDBwWJAAIWPmf//8zDBpFDwYVBAAc4JJYWJDAoXKn4SC+EPAgXzC5JGCx4qDC4n//BIIEIRCEC4v/GBBdHC4xhCIw5dDC5BhCJAgXCRQoXGJAQXEUhAXHJAyNGC5KRCC7p2FC5B4CC5kggQXOBwvyBQMvSA4XL+EIwCoIC8ZHCgYXNO44LBBIiPPCAIwFC5DXGAAMwGAjvPGA4XIwYXHGALBDnAXFhCQHGAaOFwAXGPA4bFC4xIMIxIXDJBJGEC4xICSJCNEIwowEMJBdCFwwXEMJBdCC5BICDA4WDIw4wEAAMzCoMzBAgWIDAwAGCxRJEAAxFJDBgWNDBAWPAH4AYA=="))
github espruino / BangleApps / apps / mmonday / manic-monday-icon.js View on Github external
require("heatshrink").decompress(atob("MDABAAAA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YLFApZkNH6YIHJ5BMNY97IZY6yvTTJCGRBwQRIExYVKB4zH+ZDDHpBQ7HgH5Q+QY/7IYY9KDJY6QeKY6xDOY/7H7BhRiPCRQGHA4SsRCJDH4ZDJqUfpQiIBR6UNDRISQOJ52TY9DIYNSyvSIZLfOAxoaIY/7HVZC4SQQBSJUC57HTDIw9QGZzH/Y7xmINyTHTAAwfKHyzH/OBTH3CRg1LYxAUFD5Y+QY9RXLLxQaWY6yIYY6g5SH57kHY9StRcbZPQQJivRC6AKJEBpGHBxrH/DcbHUEpQKQBojSPH5gpIXx7HjVp4caJkbjRGv4AkA=="))
github espruino / BangleApps / apps / openloc / openlocation-icon.js View on Github external
require("heatshrink").decompress(atob("mEwwhC/AFWIAAQVVDKQSDl3ikUoDB0IC4ci93u8QFBwAWPxGCC4gYLLQoXC9BiMFwOCLYJaBC4RfCkQwJCIZCCAoJGDDYQXIlwWBkUulAXBFwQcDIw5YGwQWCEQcoJAwLEa44LCGA4LDN4QaFVghGIC4IbBOgYABxwMCJAoXEdYqODC5IiDVAheFQgQXFBYjrGEIoXEEYouFKQZ4HC4r+BIxAXHFpAXHToIXILggXOBgMikQXFLwoXHU4IRBdhAXKBoIXHIwx3GBwJ1GXooXHhAYCFwoXId4oQCPAMiDQY4BfIoXIPQLBGPIkoC5AODPRIXFPAQXE8QYEC4R2FC5BJFC5RICC5JpCIwwwEKwYXEEIIuHC5HoC4pmBC45ICHwSQGFwJGHGAZWDeYouJGAZ4CCwoABFxIYDkTvFCxp6EAAwWMDBIWODIwVRAH4AXA="))
github espruino / BangleApps / apps / gpsinfo / gps-info.js View on Github external
var img = require("heatshrink").decompress(atob("mEwghC/AH4AKg9wC6t3u4uVC6wWBI6t3uJeVuMQCqcBLisAi4XLxAABFxAXKgc4DBAuBRhQXEDAq7MmYXEwBHEXZYXFGAOqAAKDMmczC4mIC62CC50PC4JIBkQABiIvRmURAAUSjQXSFwMoxGKC6CRFwUSVYgXLPIgXXwMYegoXLJAYXCGBnzGA0hPQIwMgYwGC6gwCC4ZIMC4gYBC604C4ZISmcRVgapQAAMhC6GIJIwXCMBcIxGDDBAuLC4IwGAARGMAAQWGmAXPJQoWMC4pwCCpoXJAB4XXAH4A/ABQA="))

Bangle.setGPSPower(1);
Bangle.setLCDMode("doublebuffered");

var lastFix = {
  fix: 0,
  alt: 0,
  lat: 0,
  lon: 0,
  speed: 0,
  time: 0,
  satellites: 0
};
var nofix = 0;

function formatTime(now) {
github espruino / BangleApps / apps / gpstime / gpstime.js View on Github external
var img = require("heatshrink").decompress(atob("mEwghC/AH8A1QWVhWq0AuVAAIuVAAIwT1WinQwTFwMzmQwTCYMjlUqGCIuBlWi0UzC6JdBIoMjC4UDmAuOkYXBPAWgmczLp2ilUiVAUDC4IwLFwIUBLoJ2BFwQwM1WjCgJ1DFwQwLFwJ1B0SQCkQWDGBQXBCgK9BDgKQBAAgwJOwUzRgIDBC54wCkZdGPBwACRgguDBIIwLFxEJBQIwLFxGaBYQwKFxQwLgAWGmQuBcAQwJC48ifYYwJgUidgsyC4L7DGBIXBdohnBCgL7BcYIXIGAqMCIoL7DL5IwERgIUBLoL7BO5QXBGAK7DkWiOxQXGFwOjFoUyFxZhDgBdCCgJ1CCxYxCgBABkcqOwIuNGAQXC0S9BLpgAFXoIwBmYuPAAYwCLp4wHFyYwDFyYwDFygwCCyoA/AFQA="));

Bangle.setLCDPower(1);
Bangle.setLCDTimeout(0);

g.clear();



var fix;
Bangle.on('GPS',function(f) {
  fix = f;
  g.setFont("6x8",2);
  g.setFontAlign(0,0);
  g.clearRect(90,30,239,90);
  if (fix.fix) {
    g.drawString("GPS",170,40);
github espruino / BangleApps / apps / pparrot / party-parrot.js View on Github external
function drawImg (i) {
  g.drawImage({
    width: 80, height: 57, bpp: 8,
    buffer: require("heatshrink").decompress(imgs[i])
  }, 0, 0, {scale: 3});
}

heatshrink

heatshrink compression lib

ISC
Latest version published 7 years ago

Package Health Score

40 / 100
Full package analysis

Popular heatshrink functions