remove commented old zlib code
This commit is contained in:
@@ -215,25 +215,6 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
|
||||
}
|
||||
if (err) return callback(err);
|
||||
|
||||
/*
|
||||
try {
|
||||
var grid = zlib.inflate(
|
||||
!Buffer.isBuffer(row.grid)
|
||||
? new Buffer(row.grid, 'binary')
|
||||
: row.grid
|
||||
).toString();
|
||||
var data = rows.reduce(function(memo, r) {
|
||||
memo[r.key_name] = JSON.parse(r.key_json);
|
||||
return memo;
|
||||
}, {});
|
||||
var result = _(JSON.parse(grid)).extend({ data: data });
|
||||
} catch (err) {
|
||||
return callback(new Error('Grid is invalid:' + err.message));
|
||||
}
|
||||
|
||||
callback(null, result);
|
||||
*/
|
||||
|
||||
zlib.inflate(!Buffer.isBuffer(row.grid)
|
||||
? new Buffer(row.grid, 'binary')
|
||||
: row.grid
|
||||
@@ -584,10 +565,6 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
|
||||
var id = crypto.createHash('md5').update(json).digest('hex');
|
||||
if (!this._gridCache[id]) {
|
||||
// This corresponds to the grid_utfgrid table.
|
||||
|
||||
/*
|
||||
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
|
||||
*/
|
||||
var that = this;
|
||||
Step(function() {
|
||||
zlib.deflate(new Buffer(json, 'utf8'),this);
|
||||
|
||||
Reference in New Issue
Block a user