File tree 2 files changed +5
-2
lines changed
core/src/main/java/com/orientechnologies/orient/core/serialization/compression/impl
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,18 @@ public class OGZIPCompression implements OCompression {
37
37
@ Override
38
38
public byte [] compress (final byte [] content ) {
39
39
try {
40
+ final byte [] result ;
40
41
final OMemoryStream memoryOutputStream = new OMemoryStream ();
41
42
final GZIPOutputStream gzipOutputStream = new GZIPOutputStream (memoryOutputStream );
42
43
try {
43
44
gzipOutputStream .write (content );
44
45
gzipOutputStream .finish ();
46
+ result = memoryOutputStream .toByteArray ();
45
47
} finally {
46
48
gzipOutputStream .close ();
47
49
}
48
- return memoryOutputStream .toByteArray ();
50
+
51
+ return result ;
49
52
} catch (IOException ioe ) {
50
53
throw new IllegalStateException ("Exception during data compression." , ioe );
51
54
}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ References:
91
91
92
92
4) now always in the console import the old database in the new one:
93
93
94
- orientdb> import database /temp/db.json.gzip
94
+ orientdb> import database /temp/db.json.gzip -preserveClusterIDs=true
95
95
orientdb> quit
96
96
97
97
You can’t perform that action at this time.
0 commit comments