// Compiled by ClojureScript 1.10.520 {:target :nodejs}
goog.provide('weathergen.encoding');
goog.require('cljs.core');
goog.require('cognitect.transit');
goog.require('goog.crypt.base64');
weathergen.encoding.encoder = cognitect.transit.writer.call(null,new cljs.core.Keyword(null,"json","json",1279968570));
weathergen.encoding.decoder = cognitect.transit.reader.call(null,new cljs.core.Keyword(null,"json","json",1279968570));
weathergen.encoding.deflate = (function weathergen$encoding$deflate(data){
return pako.deflate(data);
});
weathergen.encoding.deflate_string = (function weathergen$encoding$deflate_string(data){
return pako.deflate(data,({"to": "string"}));
});
weathergen.encoding.inflate = (function weathergen$encoding$inflate(data){
return pako.inflate(data);
});
weathergen.encoding.inflate_string = (function weathergen$encoding$inflate_string(data){
return pako.inflate(data,({"to": "string"}));
});
weathergen.encoding.encode = (function weathergen$encoding$encode(val){
return cognitect.transit.write.call(null,weathergen.encoding.encoder,val);
});
weathergen.encoding.decode = (function weathergen$encoding$decode(val){
return cognitect.transit.read.call(null,weathergen.encoding.decoder,val);
});
weathergen.encoding.data__GT_base64 = (function weathergen$encoding$data__GT_base64(data){
return goog.crypt.base64.encodeByteArray(weathergen.encoding.deflate.call(null,weathergen.encoding.encode.call(null,data)),true);
});
weathergen.encoding.base64__GT_data = (function weathergen$encoding$base64__GT_data(b64){
return weathergen.encoding.decode.call(null,weathergen.encoding.inflate_string.call(null,goog.crypt.base64.decodeStringToUint8Array(b64)));
});
