Permalink
Browse files

Improve gzip export ratio (bug #387)

  • Loading branch information...
1 parent 990b3b8 commit 7639ff8b9512d79f901cfc78532cad5f13739d92 @vrana committed Feb 24, 2014
Showing with 11 additions and 1 deletion.
  1. +1 −1 adminer/include/adminer.inc.php
  2. +9 −0 adminer/include/editing.inc.php
  3. +1 −0 changes.txt
@@ -740,7 +740,7 @@ function dumpHeaders($identifier, $multi_table = false) {
($ext == "sql" || $output != "file" ? "text/plain" : "text/csv") . "; charset=utf-8"
)));
if ($output == "gz") {
- ob_start('gzencode', 1e6);
+ ob_start('ob_gzencode', 1e6);
}
return $ext;
}
@@ -496,3 +496,12 @@ function doc_link($paths) {
);
return ($paths[$jush] ? "<a href='$urls[$jush]$paths[$jush]' target='_blank' rel='noreferrer'><sup>?</sup></a>" : "");
}
+
+/** Wrap gzencode() for usage in ob_start()
+* @param string
+* @return string
+*/
+function ob_gzencode($string) {
+ // ob_start() callback recieves an optional parameter $phase but gzencode() accepts optional parameter $level
+ return gzencode($string);
+}
View
@@ -1,4 +1,5 @@
Adminer 4.0.4-dev:
+Improve gzip export ratio (bug #387)
MySQL: Respect daylight saving time in dump, bug since Adminer 3.6.4
SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
Editor: Fix login() method, bug since Adminer 4.0.0

1 comment on commit 7639ff8

@JakubJarabica

👍 Please, release this version as soon as possible :)

Please sign in to comment.