mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix ordering of BufferedOutputStream; huge speed fix
This commit is contained in:
@@ -7384,12 +7384,11 @@ public class PApplet implements PConstants {
|
||||
static public OutputStream createOutput(File file) {
|
||||
try {
|
||||
createPath(file); // make sure the path exists
|
||||
OutputStream output =
|
||||
new BufferedOutputStream(new FileOutputStream(file));
|
||||
OutputStream output = new FileOutputStream(file);
|
||||
if (file.getName().toLowerCase().endsWith(".gz")) {
|
||||
return new GZIPOutputStream(output);
|
||||
return new BufferedOutputStream(new GZIPOutputStream(output));
|
||||
}
|
||||
return output;
|
||||
return new BufferedOutputStream(output);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user