- json_contents = buffer.toString('utf8', 0, bytesRead);
- json_last_modified = st.mtime.getTime();
- possibly_wakeup_clients();
+ var new_json_contents = buffer.toString('utf8', 0, bytesRead);
+ zlib.gzip(new_json_contents, function(err, buffer) {
+ if (err) throw err;
+ json_contents = new_json_contents;
+ json_contents_gz = buffer;
+ json_last_modified = st.mtime.getTime();
+ possibly_wakeup_clients();
+ });