mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 05:44:51 +00:00
do not copy big byte arrays, store only references (ByteArrayRange) e.g in image tags
This commit is contained in:
@@ -75,6 +75,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord;
|
||||
import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD;
|
||||
import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord;
|
||||
import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import com.jpexs.helpers.utf8.Utf8Helper;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -131,6 +132,12 @@ public class SWFOutputStream extends OutputStream {
|
||||
pos += b.length;
|
||||
}
|
||||
|
||||
public void write(ByteArrayRange b) throws IOException {
|
||||
alignByte();
|
||||
os.write(b.getArray(), b.getPos(), b.getLength());
|
||||
pos += b.getLength();
|
||||
}
|
||||
|
||||
private void alignByte() throws IOException {
|
||||
if (bitPos > 0) {
|
||||
bitPos = 0;
|
||||
|
||||
Reference in New Issue
Block a user