From 6f24e083c56b4f7bdba7b25d488de604bb6c9af8 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 3 Jan 2012 16:35:46 -0800 Subject: [PATCH] remove commented old zlib code --- lib/mbtiles.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/lib/mbtiles.js b/lib/mbtiles.js index 41f1255..59ad15c 100644 --- a/lib/mbtiles.js +++ b/lib/mbtiles.js @@ -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);