Commit d27bcf3 qiang101.wang
committed
1 parent ee106bc commit d27bcf3 Copy full SHA for d27bcf3
File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
- var lz4 = require ( 'lz4' ) ;
2
1
const path = require ( 'path' ) ;
3
2
4
3
//each part of header length
@@ -108,7 +107,10 @@ class Wbc {
108
107
generateBody ( oriBody ) {
109
108
let pointer = 0 ;
110
109
//use lz4 to compress quickJs bytecode
111
- var bodyChunk = lz4 . encode ( oriBody ) ;
110
+ //以后要压缩时直接放开使用,wbc的结构暂且不做变更,防止后面会使用其他的压缩算法减少bytecode的大小
111
+ // var bodyChunk = lz4.encode(oriBody);
112
+ // let length = BODY_LENGTH + BODY_CHUNK_TYPE + bodyChunk.length + BODY_CRC32;
113
+ var bodyChunk = oriBody ;
112
114
let length = BODY_LENGTH + BODY_CHUNK_TYPE + bodyChunk . length + BODY_CRC32 ;
113
115
const bodyBuffer = Buffer . alloc ( length ) ;
114
116
Original file line number Diff line number Diff line change 26
26
"bindings" : " ^1.5.0" ,
27
27
"commander" : " ^8.2.0" ,
28
28
"crc32" : " ^0.2.2" ,
29
- "lz4" : " ^0.6.5" ,
30
29
"nan" : " ^2.15.0" ,
31
30
"node-addon-api" : " ^4.1.0" ,
32
31
"node-gyp" : " ^9.0.0" ,
You can’t perform that action at this time.
0 commit comments