@loaders.gl/parquet 4.2.0-alpha.4 → 4.2.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/dist/index.cjs +269 -616
  2. package/dist/index.cjs.map +7 -0
  3. package/dist/index.d.ts +12 -12
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +6 -1
  6. package/dist/lib/arrow/convert-columns-to-row-group.js +1 -2
  7. package/dist/lib/arrow/convert-row-group-to-columns.js +8 -6
  8. package/dist/lib/arrow/convert-schema-from-parquet.d.ts +3 -3
  9. package/dist/lib/arrow/convert-schema-from-parquet.d.ts.map +1 -1
  10. package/dist/lib/arrow/convert-schema-from-parquet.js +71 -82
  11. package/dist/lib/arrow/convert-schema-to-parquet.d.ts +1 -1
  12. package/dist/lib/arrow/convert-schema-to-parquet.d.ts.map +1 -1
  13. package/dist/lib/arrow/convert-schema-to-parquet.js +65 -35
  14. package/dist/lib/constants.js +14 -1
  15. package/dist/lib/parsers/get-parquet-schema.d.ts +1 -1
  16. package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
  17. package/dist/lib/parsers/get-parquet-schema.js +9 -7
  18. package/dist/lib/parsers/parse-geoparquet.d.ts +1 -1
  19. package/dist/lib/parsers/parse-geoparquet.d.ts.map +1 -1
  20. package/dist/lib/parsers/parse-geoparquet.js +47 -45
  21. package/dist/lib/parsers/parse-parquet-to-columns.d.ts +1 -1
  22. package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
  23. package/dist/lib/parsers/parse-parquet-to-columns.js +36 -25
  24. package/dist/lib/parsers/parse-parquet.d.ts +1 -1
  25. package/dist/lib/parsers/parse-parquet.d.ts.map +1 -1
  26. package/dist/lib/parsers/parse-parquet.js +62 -50
  27. package/dist/lib/wasm/encode-parquet-wasm.d.ts +1 -1
  28. package/dist/lib/wasm/encode-parquet-wasm.d.ts.map +1 -1
  29. package/dist/lib/wasm/encode-parquet-wasm.js +49 -12
  30. package/dist/lib/wasm/load-wasm.js +13 -10
  31. package/dist/lib/wasm/parse-parquet-wasm.d.ts +1 -1
  32. package/dist/lib/wasm/parse-parquet-wasm.d.ts.map +1 -1
  33. package/dist/lib/wasm/parse-parquet-wasm.js +19 -15
  34. package/dist/parquet-loader.d.ts +1 -1
  35. package/dist/parquet-loader.d.ts.map +1 -1
  36. package/dist/parquet-loader.js +77 -64
  37. package/dist/parquet-wasm-loader.js +25 -28
  38. package/dist/parquet-wasm-writer.js +19 -23
  39. package/dist/parquet-writer.js +16 -12
  40. package/dist/parquetjs/codecs/declare.d.ts +1 -1
  41. package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
  42. package/dist/parquetjs/codecs/declare.js +0 -1
  43. package/dist/parquetjs/codecs/dictionary.js +4 -8
  44. package/dist/parquetjs/codecs/index.d.ts +3 -3
  45. package/dist/parquetjs/codecs/index.d.ts.map +1 -1
  46. package/dist/parquetjs/codecs/index.js +20 -17
  47. package/dist/parquetjs/codecs/plain.d.ts +2 -2
  48. package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
  49. package/dist/parquetjs/codecs/plain.js +166 -162
  50. package/dist/parquetjs/codecs/rle.d.ts +2 -2
  51. package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
  52. package/dist/parquetjs/codecs/rle.js +124 -105
  53. package/dist/parquetjs/compression.d.ts +1 -1
  54. package/dist/parquetjs/compression.d.ts.map +1 -1
  55. package/dist/parquetjs/compression.js +157 -43
  56. package/dist/parquetjs/encoder/parquet-encoder.d.ts +3 -3
  57. package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
  58. package/dist/parquetjs/encoder/parquet-encoder.js +406 -275
  59. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +12 -7
  60. package/dist/parquetjs/parquet-thrift/BsonType.js +31 -27
  61. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts +1 -1
  62. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
  63. package/dist/parquetjs/parquet-thrift/ColumnChunk.js +175 -166
  64. package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts +1 -1
  65. package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts.map +1 -1
  66. package/dist/parquetjs/parquet-thrift/ColumnIndex.js +178 -166
  67. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts +6 -6
  68. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
  69. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +359 -333
  70. package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts +1 -1
  71. package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts.map +1 -1
  72. package/dist/parquetjs/parquet-thrift/ColumnOrder.js +73 -68
  73. package/dist/parquetjs/parquet-thrift/CompressionCodec.js +17 -12
  74. package/dist/parquetjs/parquet-thrift/ConvertedType.js +31 -26
  75. package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts +2 -2
  76. package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts.map +1 -1
  77. package/dist/parquetjs/parquet-thrift/DataPageHeader.js +136 -124
  78. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts +2 -2
  79. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts.map +1 -1
  80. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +198 -181
  81. package/dist/parquetjs/parquet-thrift/DateType.js +31 -27
  82. package/dist/parquetjs/parquet-thrift/DecimalType.js +76 -69
  83. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts +1 -1
  84. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts.map +1 -1
  85. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +93 -86
  86. package/dist/parquetjs/parquet-thrift/Encoding.js +17 -12
  87. package/dist/parquetjs/parquet-thrift/EnumType.js +31 -27
  88. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +12 -7
  89. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts +4 -4
  90. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
  91. package/dist/parquetjs/parquet-thrift/FileMetaData.js +217 -205
  92. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +31 -27
  93. package/dist/parquetjs/parquet-thrift/IntType.js +76 -69
  94. package/dist/parquetjs/parquet-thrift/JsonType.js +31 -27
  95. package/dist/parquetjs/parquet-thrift/KeyValue.js +73 -67
  96. package/dist/parquetjs/parquet-thrift/ListType.js +31 -27
  97. package/dist/parquetjs/parquet-thrift/LogicalType.d.ts +13 -13
  98. package/dist/parquetjs/parquet-thrift/LogicalType.d.ts.map +1 -1
  99. package/dist/parquetjs/parquet-thrift/LogicalType.js +325 -344
  100. package/dist/parquetjs/parquet-thrift/MapType.js +31 -27
  101. package/dist/parquetjs/parquet-thrift/MicroSeconds.js +31 -27
  102. package/dist/parquetjs/parquet-thrift/MilliSeconds.js +31 -27
  103. package/dist/parquetjs/parquet-thrift/NullType.js +31 -27
  104. package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts +1 -1
  105. package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts.map +1 -1
  106. package/dist/parquetjs/parquet-thrift/OffsetIndex.js +66 -60
  107. package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts +2 -2
  108. package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts.map +1 -1
  109. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +98 -88
  110. package/dist/parquetjs/parquet-thrift/PageHeader.d.ts +5 -5
  111. package/dist/parquetjs/parquet-thrift/PageHeader.d.ts.map +1 -1
  112. package/dist/parquetjs/parquet-thrift/PageHeader.js +185 -175
  113. package/dist/parquetjs/parquet-thrift/PageLocation.js +108 -96
  114. package/dist/parquetjs/parquet-thrift/PageType.js +13 -8
  115. package/dist/parquetjs/parquet-thrift/RowGroup.d.ts +2 -2
  116. package/dist/parquetjs/parquet-thrift/RowGroup.d.ts.map +1 -1
  117. package/dist/parquetjs/parquet-thrift/RowGroup.js +145 -133
  118. package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts +4 -4
  119. package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts.map +1 -1
  120. package/dist/parquetjs/parquet-thrift/SchemaElement.js +211 -205
  121. package/dist/parquetjs/parquet-thrift/SortingColumn.js +98 -88
  122. package/dist/parquetjs/parquet-thrift/Statistics.js +143 -137
  123. package/dist/parquetjs/parquet-thrift/StringType.js +31 -27
  124. package/dist/parquetjs/parquet-thrift/TimeType.d.ts +1 -1
  125. package/dist/parquetjs/parquet-thrift/TimeType.d.ts.map +1 -1
  126. package/dist/parquetjs/parquet-thrift/TimeType.js +76 -69
  127. package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts +2 -2
  128. package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts.map +1 -1
  129. package/dist/parquetjs/parquet-thrift/TimeUnit.js +94 -91
  130. package/dist/parquetjs/parquet-thrift/TimestampType.d.ts +1 -1
  131. package/dist/parquetjs/parquet-thrift/TimestampType.d.ts.map +1 -1
  132. package/dist/parquetjs/parquet-thrift/TimestampType.js +76 -69
  133. package/dist/parquetjs/parquet-thrift/Type.js +17 -12
  134. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +31 -27
  135. package/dist/parquetjs/parquet-thrift/UUIDType.js +31 -27
  136. package/dist/parquetjs/parquet-thrift/index.d.ts +44 -44
  137. package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
  138. package/dist/parquetjs/parquet-thrift/index.js +6 -1
  139. package/dist/parquetjs/parser/decoders.d.ts +3 -3
  140. package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
  141. package/dist/parquetjs/parser/decoders.js +306 -242
  142. package/dist/parquetjs/parser/parquet-reader.d.ts +3 -3
  143. package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
  144. package/dist/parquetjs/parser/parquet-reader.js +179 -157
  145. package/dist/parquetjs/schema/declare.d.ts +1 -1
  146. package/dist/parquetjs/schema/declare.d.ts.map +1 -1
  147. package/dist/parquetjs/schema/declare.js +6 -9
  148. package/dist/parquetjs/schema/schema.d.ts +1 -1
  149. package/dist/parquetjs/schema/schema.d.ts.map +1 -1
  150. package/dist/parquetjs/schema/schema.js +139 -120
  151. package/dist/parquetjs/schema/shred.d.ts +2 -2
  152. package/dist/parquetjs/schema/shred.d.ts.map +1 -1
  153. package/dist/parquetjs/schema/shred.js +301 -204
  154. package/dist/parquetjs/schema/types.d.ts +1 -1
  155. package/dist/parquetjs/schema/types.d.ts.map +1 -1
  156. package/dist/parquetjs/schema/types.js +328 -314
  157. package/dist/parquetjs/utils/file-utils.js +24 -23
  158. package/dist/parquetjs/utils/read-utils.d.ts +1 -1
  159. package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
  160. package/dist/parquetjs/utils/read-utils.js +79 -69
  161. package/dist/polyfills/buffer/buffer-polyfill.browser.js +8 -3
  162. package/dist/polyfills/buffer/buffer-polyfill.node.js +13 -8
  163. package/dist/polyfills/buffer/buffer.js +1750 -1367
  164. package/dist/polyfills/buffer/index.d.ts +3 -3
  165. package/dist/polyfills/buffer/index.d.ts.map +1 -1
  166. package/dist/polyfills/buffer/index.js +5 -1
  167. package/dist/polyfills/buffer/install-buffer-polyfill.js +2 -1
  168. package/dist/polyfills/util.js +4 -1
  169. package/dist/workers/parquet-worker.js +3 -1
  170. package/package.json +15 -13
  171. package/src/index.ts +1 -1
  172. package/src/lib/parsers/parse-parquet-to-columns.ts +1 -1
  173. package/src/lib/parsers/parse-parquet.ts +1 -1
  174. package/src/parquetjs/encoder/parquet-encoder.ts +2 -2
  175. package/src/parquetjs/parser/decoders.ts +2 -2
  176. package/src/parquetjs/parser/parquet-reader.ts +1 -1
  177. package/src/parquetjs/schema/schema.ts +1 -1
  178. package/src/parquetjs/utils/read-utils.ts +2 -2
  179. package/dist/index.js.map +0 -1
  180. package/dist/lib/arrow/convert-columns-to-row-group.js.map +0 -1
  181. package/dist/lib/arrow/convert-row-group-to-columns.js.map +0 -1
  182. package/dist/lib/arrow/convert-schema-from-parquet.js.map +0 -1
  183. package/dist/lib/arrow/convert-schema-to-parquet.js.map +0 -1
  184. package/dist/lib/constants.js.map +0 -1
  185. package/dist/lib/parsers/get-parquet-schema.js.map +0 -1
  186. package/dist/lib/parsers/parse-geoparquet.js.map +0 -1
  187. package/dist/lib/parsers/parse-parquet-to-columns.js.map +0 -1
  188. package/dist/lib/parsers/parse-parquet.js.map +0 -1
  189. package/dist/lib/wasm/encode-parquet-wasm.js.map +0 -1
  190. package/dist/lib/wasm/load-wasm.js.map +0 -1
  191. package/dist/lib/wasm/parse-parquet-wasm.js.map +0 -1
  192. package/dist/lib/wip/convert-schema-deep.java.disabled +0 -910
  193. package/dist/lib/wip/convert-schema-deep.rs.disabled +0 -976
  194. package/dist/parquet-loader.js.map +0 -1
  195. package/dist/parquet-wasm-loader.js.map +0 -1
  196. package/dist/parquet-wasm-writer.js.map +0 -1
  197. package/dist/parquet-writer.js.map +0 -1
  198. package/dist/parquetjs/LICENSE +0 -20
  199. package/dist/parquetjs/codecs/declare.js.map +0 -1
  200. package/dist/parquetjs/codecs/dictionary.js.map +0 -1
  201. package/dist/parquetjs/codecs/index.js.map +0 -1
  202. package/dist/parquetjs/codecs/plain.js.map +0 -1
  203. package/dist/parquetjs/codecs/rle.js.map +0 -1
  204. package/dist/parquetjs/compression.js.map +0 -1
  205. package/dist/parquetjs/encoder/parquet-encoder.js.map +0 -1
  206. package/dist/parquetjs/modules.d.ts +0 -21
  207. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js.map +0 -1
  208. package/dist/parquetjs/parquet-thrift/BsonType.js.map +0 -1
  209. package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +0 -1
  210. package/dist/parquetjs/parquet-thrift/ColumnIndex.js.map +0 -1
  211. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +0 -1
  212. package/dist/parquetjs/parquet-thrift/ColumnOrder.js.map +0 -1
  213. package/dist/parquetjs/parquet-thrift/CompressionCodec.js.map +0 -1
  214. package/dist/parquetjs/parquet-thrift/ConvertedType.js.map +0 -1
  215. package/dist/parquetjs/parquet-thrift/DataPageHeader.js.map +0 -1
  216. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js.map +0 -1
  217. package/dist/parquetjs/parquet-thrift/DateType.js.map +0 -1
  218. package/dist/parquetjs/parquet-thrift/DecimalType.js.map +0 -1
  219. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js.map +0 -1
  220. package/dist/parquetjs/parquet-thrift/Encoding.js.map +0 -1
  221. package/dist/parquetjs/parquet-thrift/EnumType.js.map +0 -1
  222. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js.map +0 -1
  223. package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +0 -1
  224. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js.map +0 -1
  225. package/dist/parquetjs/parquet-thrift/IntType.js.map +0 -1
  226. package/dist/parquetjs/parquet-thrift/JsonType.js.map +0 -1
  227. package/dist/parquetjs/parquet-thrift/KeyValue.js.map +0 -1
  228. package/dist/parquetjs/parquet-thrift/ListType.js.map +0 -1
  229. package/dist/parquetjs/parquet-thrift/LogicalType.js.map +0 -1
  230. package/dist/parquetjs/parquet-thrift/MapType.js.map +0 -1
  231. package/dist/parquetjs/parquet-thrift/MicroSeconds.js.map +0 -1
  232. package/dist/parquetjs/parquet-thrift/MilliSeconds.js.map +0 -1
  233. package/dist/parquetjs/parquet-thrift/NullType.js.map +0 -1
  234. package/dist/parquetjs/parquet-thrift/OffsetIndex.js.map +0 -1
  235. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js.map +0 -1
  236. package/dist/parquetjs/parquet-thrift/PageHeader.js.map +0 -1
  237. package/dist/parquetjs/parquet-thrift/PageLocation.js.map +0 -1
  238. package/dist/parquetjs/parquet-thrift/PageType.js.map +0 -1
  239. package/dist/parquetjs/parquet-thrift/RowGroup.js.map +0 -1
  240. package/dist/parquetjs/parquet-thrift/SchemaElement.js.map +0 -1
  241. package/dist/parquetjs/parquet-thrift/SortingColumn.js.map +0 -1
  242. package/dist/parquetjs/parquet-thrift/Statistics.js.map +0 -1
  243. package/dist/parquetjs/parquet-thrift/StringType.js.map +0 -1
  244. package/dist/parquetjs/parquet-thrift/TimeType.js.map +0 -1
  245. package/dist/parquetjs/parquet-thrift/TimeUnit.js.map +0 -1
  246. package/dist/parquetjs/parquet-thrift/TimestampType.js.map +0 -1
  247. package/dist/parquetjs/parquet-thrift/Type.js.map +0 -1
  248. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js.map +0 -1
  249. package/dist/parquetjs/parquet-thrift/UUIDType.js.map +0 -1
  250. package/dist/parquetjs/parquet-thrift/index.js.map +0 -1
  251. package/dist/parquetjs/parser/decoders.js.map +0 -1
  252. package/dist/parquetjs/parser/parquet-reader.js.map +0 -1
  253. package/dist/parquetjs/schema/declare.js.map +0 -1
  254. package/dist/parquetjs/schema/schema.js.map +0 -1
  255. package/dist/parquetjs/schema/shred.js.map +0 -1
  256. package/dist/parquetjs/schema/types.js.map +0 -1
  257. package/dist/parquetjs/utils/file-utils.js.map +0 -1
  258. package/dist/parquetjs/utils/read-utils.js.map +0 -1
  259. package/dist/polyfills/buffer/buffer-polyfill.browser.js.map +0 -1
  260. package/dist/polyfills/buffer/buffer-polyfill.node.js.map +0 -1
  261. package/dist/polyfills/buffer/buffer.js.map +0 -1
  262. package/dist/polyfills/buffer/index.js.map +0 -1
  263. package/dist/polyfills/buffer/install-buffer-polyfill.js.map +0 -1
  264. package/dist/polyfills/util.js.map +0 -1
  265. package/dist/workers/parquet-worker.js.map +0 -1
@@ -1,119 +1,138 @@
1
+ // Forked from https://github.com/kbajalc/parquets under MIT license (Copyright (c) 2017 ironSource Ltd.)
1
2
  import varint from 'varint';
3
+ // eslint-disable-next-line max-statements, complexity
2
4
  export function encodeValues(type, values, opts) {
3
- if (!('bitWidth' in opts)) {
4
- throw new Error('bitWidth is required');
5
- }
6
- switch (type) {
7
- case 'BOOLEAN':
8
- case 'INT32':
9
- case 'INT64':
10
- values = values.map(x => parseInt(x, 10));
11
- break;
12
- default:
13
- throw new Error(`unsupported type: ${type}`);
14
- }
15
- let buf = Buffer.alloc(0);
16
- let run = [];
17
- let repeats = 0;
18
- for (let i = 0; i < values.length; i++) {
19
- if (repeats === 0 && run.length % 8 === 0 && values[i] === values[i + 1]) {
20
- if (run.length) {
5
+ if (!('bitWidth' in opts)) {
6
+ throw new Error('bitWidth is required');
7
+ }
8
+ switch (type) {
9
+ case 'BOOLEAN':
10
+ case 'INT32':
11
+ case 'INT64':
12
+ // tslint:disable-next-line:no-parameter-reassignment
13
+ values = values.map((x) => parseInt(x, 10));
14
+ break;
15
+ default:
16
+ throw new Error(`unsupported type: ${type}`);
17
+ }
18
+ let buf = Buffer.alloc(0);
19
+ let run = [];
20
+ let repeats = 0;
21
+ for (let i = 0; i < values.length; i++) {
22
+ // If we are at the beginning of a run and the next value is same we start
23
+ // collecting repeated values
24
+ if (repeats === 0 && run.length % 8 === 0 && values[i] === values[i + 1]) {
25
+ // If we have any data in runs we need to encode them
26
+ if (run.length) {
27
+ buf = Buffer.concat([buf, encodeRunBitpacked(run, opts)]);
28
+ run = [];
29
+ }
30
+ repeats = 1;
31
+ }
32
+ else if (repeats > 0 && values[i] === values[i - 1]) {
33
+ repeats += 1;
34
+ }
35
+ else {
36
+ // If values changes we need to post any previous repeated values
37
+ if (repeats) {
38
+ buf = Buffer.concat([buf, encodeRunRepeated(values[i - 1], repeats, opts)]);
39
+ repeats = 0;
40
+ }
41
+ run.push(values[i]);
42
+ }
43
+ }
44
+ if (repeats) {
45
+ buf = Buffer.concat([buf, encodeRunRepeated(values[values.length - 1], repeats, opts)]);
46
+ }
47
+ else if (run.length) {
21
48
  buf = Buffer.concat([buf, encodeRunBitpacked(run, opts)]);
22
- run = [];
23
- }
24
- repeats = 1;
25
- } else if (repeats > 0 && values[i] === values[i - 1]) {
26
- repeats += 1;
27
- } else {
28
- if (repeats) {
29
- buf = Buffer.concat([buf, encodeRunRepeated(values[i - 1], repeats, opts)]);
30
- repeats = 0;
31
- }
32
- run.push(values[i]);
33
- }
34
- }
35
- if (repeats) {
36
- buf = Buffer.concat([buf, encodeRunRepeated(values[values.length - 1], repeats, opts)]);
37
- } else if (run.length) {
38
- buf = Buffer.concat([buf, encodeRunBitpacked(run, opts)]);
39
- }
40
- if (opts.disableEnvelope) {
41
- return buf;
42
- }
43
- const envelope = Buffer.alloc(buf.length + 4);
44
- envelope.writeUInt32LE(buf.length, undefined);
45
- buf.copy(envelope, 4);
46
- return envelope;
49
+ }
50
+ if (opts.disableEnvelope) {
51
+ return buf;
52
+ }
53
+ const envelope = Buffer.alloc(buf.length + 4);
54
+ // @ts-ignore buffer polyfill
55
+ envelope.writeUInt32LE(buf.length, undefined);
56
+ buf.copy(envelope, 4);
57
+ return envelope;
47
58
  }
48
59
  export function decodeValues(type, cursor, count, opts) {
49
- if (!('bitWidth' in opts)) {
50
- throw new Error('bitWidth is required');
51
- }
52
- if (!opts.disableEnvelope) {
53
- cursor.offset += 4;
54
- }
55
- let values = [];
56
- while (values.length < count) {
57
- const header = varint.decode(cursor.buffer, cursor.offset);
58
- cursor.offset += varint.encodingLength(header);
59
- if (header & 1) {
60
- const count = (header >> 1) * 8;
61
- values.push(...decodeRunBitpacked(cursor, count, opts));
62
- } else {
63
- const count = header >> 1;
64
- values.push(...decodeRunRepeated(cursor, count, opts));
65
- }
66
- }
67
- values = values.slice(0, count);
68
- if (values.length !== count) {
69
- throw new Error('invalid RLE encoding');
70
- }
71
- return values;
60
+ if (!('bitWidth' in opts)) {
61
+ throw new Error('bitWidth is required');
62
+ }
63
+ if (!opts.disableEnvelope) {
64
+ cursor.offset += 4;
65
+ }
66
+ let values = [];
67
+ while (values.length < count) {
68
+ const header = varint.decode(cursor.buffer, cursor.offset);
69
+ cursor.offset += varint.encodingLength(header);
70
+ if (header & 1) {
71
+ const count = (header >> 1) * 8;
72
+ values.push(...decodeRunBitpacked(cursor, count, opts));
73
+ }
74
+ else {
75
+ const count = header >> 1;
76
+ values.push(...decodeRunRepeated(cursor, count, opts));
77
+ }
78
+ }
79
+ values = values.slice(0, count);
80
+ if (values.length !== count) {
81
+ throw new Error('invalid RLE encoding');
82
+ }
83
+ return values;
72
84
  }
73
85
  function decodeRunBitpacked(cursor, count, opts) {
74
- const bitWidth = opts.bitWidth;
75
- if (count % 8 !== 0) {
76
- throw new Error('must be a multiple of 8');
77
- }
78
- const values = new Array(count).fill(0);
79
- for (let b = 0; b < bitWidth * count; b++) {
80
- if (cursor.buffer[cursor.offset + Math.floor(b / 8)] & 1 << b % 8) {
81
- values[Math.floor(b / bitWidth)] |= 1 << b % bitWidth;
82
- }
83
- }
84
- cursor.offset += bitWidth * (count / 8);
85
- return values;
86
+ // @ts-ignore
87
+ const bitWidth = opts.bitWidth;
88
+ if (count % 8 !== 0) {
89
+ throw new Error('must be a multiple of 8');
90
+ }
91
+ // tslint:disable-next-line:prefer-array-literal
92
+ const values = new Array(count).fill(0);
93
+ for (let b = 0; b < bitWidth * count; b++) {
94
+ if (cursor.buffer[cursor.offset + Math.floor(b / 8)] & (1 << b % 8)) {
95
+ values[Math.floor(b / bitWidth)] |= 1 << b % bitWidth;
96
+ }
97
+ }
98
+ cursor.offset += bitWidth * (count / 8);
99
+ return values;
86
100
  }
87
101
  function decodeRunRepeated(cursor, count, opts) {
88
- const bitWidth = opts.bitWidth;
89
- let value = 0;
90
- for (let i = 0; i < Math.ceil(bitWidth / 8); i++) {
91
- value << 8;
92
- value += cursor.buffer[cursor.offset];
93
- cursor.offset += 1;
94
- }
95
- return new Array(count).fill(value);
102
+ // @ts-ignore
103
+ const bitWidth = opts.bitWidth;
104
+ let value = 0;
105
+ for (let i = 0; i < Math.ceil(bitWidth / 8); i++) {
106
+ // eslint-disable-next-line
107
+ value << 8; // TODO - this looks wrong
108
+ value += cursor.buffer[cursor.offset];
109
+ cursor.offset += 1;
110
+ }
111
+ // tslint:disable-next-line:prefer-array-literal
112
+ return new Array(count).fill(value);
96
113
  }
97
114
  function encodeRunBitpacked(values, opts) {
98
- const bitWidth = opts.bitWidth;
99
- for (let i = 0; i < values.length % 8; i++) {
100
- values.push(0);
101
- }
102
- const buf = Buffer.alloc(Math.ceil(bitWidth * (values.length / 8)));
103
- for (let b = 0; b < bitWidth * values.length; b++) {
104
- if ((values[Math.floor(b / bitWidth)] & 1 << b % bitWidth) > 0) {
105
- buf[Math.floor(b / 8)] |= 1 << b % 8;
106
- }
107
- }
108
- return Buffer.concat([Buffer.from(varint.encode(values.length / 8 << 1 | 1)), buf]);
115
+ // @ts-ignore
116
+ const bitWidth = opts.bitWidth;
117
+ for (let i = 0; i < values.length % 8; i++) {
118
+ values.push(0);
119
+ }
120
+ const buf = Buffer.alloc(Math.ceil(bitWidth * (values.length / 8)));
121
+ for (let b = 0; b < bitWidth * values.length; b++) {
122
+ if ((values[Math.floor(b / bitWidth)] & (1 << b % bitWidth)) > 0) {
123
+ buf[Math.floor(b / 8)] |= 1 << b % 8;
124
+ }
125
+ }
126
+ return Buffer.concat([Buffer.from(varint.encode(((values.length / 8) << 1) | 1)), buf]);
109
127
  }
110
128
  function encodeRunRepeated(value, count, opts) {
111
- const bitWidth = opts.bitWidth;
112
- const buf = Buffer.alloc(Math.ceil(bitWidth / 8));
113
- for (let i = 0; i < buf.length; i++) {
114
- buf.writeUInt8(value & 0xff, i);
115
- value >> 8;
116
- }
117
- return Buffer.concat([Buffer.from(varint.encode(count << 1)), buf]);
129
+ // @ts-ignore
130
+ const bitWidth = opts.bitWidth;
131
+ const buf = Buffer.alloc(Math.ceil(bitWidth / 8));
132
+ for (let i = 0; i < buf.length; i++) {
133
+ buf.writeUInt8(value & 0xff, i);
134
+ // eslint-disable-next-line
135
+ value >> 8; // TODO - this looks wrong
136
+ }
137
+ return Buffer.concat([Buffer.from(varint.encode(count << 1)), buf]);
118
138
  }
119
- //# sourceMappingURL=rle.js.map
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { Compression } from '@loaders.gl/compression';
3
- import { ParquetCompression } from './schema/declare';
3
+ import { ParquetCompression } from "./schema/declare.js";
4
4
  /**
5
5
  * See https://github.com/apache/parquet-format/blob/master/Compression.md
6
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/parquetjs/compression.ts"],"names":[],"mappings":";AAIA,OAAO,EACL,WAAW,EAQZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAsCpD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,EAAE,WAAW,CAW/E,CAAC;AAEF;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAAC,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAA;CAAC,mBAGlF;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxF;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAQjB;AAKD,wBAAgB,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvF"}
1
+ {"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/parquetjs/compression.ts"],"names":[],"mappings":";AAIA,OAAO,EACL,WAAW,EAQZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,kBAAkB,EAAC,4BAAyB;AAsCpD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,EAAE,WAAW,CAW/E,CAAC;AAEF;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAAC,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAA;CAAC,mBAGlF;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxF;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAQjB;AAKD,wBAAgB,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvF"}
@@ -1,61 +1,175 @@
1
- import { NoCompression, GZipCompression, SnappyCompression, BrotliCompression, LZ4Compression, ZstdCompression } from '@loaders.gl/compression';
1
+ // Forked from https://github.com/kbajalc/parquets under MIT license (Copyright (c) 2017 ironSource Ltd.)
2
+ /* eslint-disable camelcase */
3
+ // Forked from https://github.com/ironSource/parquetjs under MIT license
4
+ import { NoCompression, GZipCompression, SnappyCompression, BrotliCompression,
5
+ // LZOCompression,
6
+ LZ4Compression, ZstdCompression } from '@loaders.gl/compression';
7
+ /** We can't use loaders-util buffer handling since we are dependent on buffers even in the browser */
2
8
  function toBuffer(arrayBuffer) {
3
- return Buffer.from(arrayBuffer);
9
+ return Buffer.from(arrayBuffer);
4
10
  }
5
11
  function toArrayBuffer(buffer) {
6
- if (Buffer.isBuffer(buffer)) {
7
- const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
8
- return typedArray.slice().buffer;
9
- }
10
- return buffer;
12
+ // TODO - per docs we should just be able to call buffer.buffer, but there are issues
13
+ if (Buffer.isBuffer(buffer)) {
14
+ const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
15
+ return typedArray.slice().buffer;
16
+ }
17
+ return buffer;
11
18
  }
19
+ // TODO switch to worker compression to avoid bundling...
20
+ // import brotli from 'brotli'; - brotli has problems with decompress in browsers
21
+ // import brotliDecompress from 'brotli/decompress';
12
22
  import lz4js from 'lz4js';
23
+ // import lzo from 'lzo';
24
+ // import {ZstdCodec} from 'zstd-codec';
25
+ // Inject large dependencies through Compression constructor options
13
26
  const modules = {
14
- lz4js
27
+ // brotli has problems with decompress in browsers
28
+ // brotli: {
29
+ // decompress: brotliDecompress,
30
+ // compress: () => {
31
+ // throw new Error('brotli compress');
32
+ // }
33
+ // },
34
+ lz4js
35
+ // lzo
36
+ // 'zstd-codec': ZstdCodec
15
37
  };
38
+ /**
39
+ * See https://github.com/apache/parquet-format/blob/master/Compression.md
40
+ */
41
+ // @ts-expect-error
16
42
  export const PARQUET_COMPRESSION_METHODS = {
17
- UNCOMPRESSED: new NoCompression(),
18
- GZIP: new GZipCompression(),
19
- SNAPPY: new SnappyCompression(),
20
- BROTLI: new BrotliCompression({
21
- modules
22
- }),
23
- LZ4: new LZ4Compression({
24
- modules
25
- }),
26
- LZ4_RAW: new LZ4Compression({
27
- modules
28
- }),
29
- ZSTD: new ZstdCompression({
30
- modules
31
- })
43
+ UNCOMPRESSED: new NoCompression(),
44
+ GZIP: new GZipCompression(),
45
+ SNAPPY: new SnappyCompression(),
46
+ BROTLI: new BrotliCompression({ modules }),
47
+ // TODO: Understand difference between LZ4 and LZ4_RAW
48
+ LZ4: new LZ4Compression({ modules }),
49
+ LZ4_RAW: new LZ4Compression({ modules }),
50
+ //
51
+ // LZO: new LZOCompression({modules}),
52
+ ZSTD: new ZstdCompression({ modules })
32
53
  };
54
+ /**
55
+ * Register compressions that have big external libraries
56
+ * @param options.modules External library dependencies
57
+ */
33
58
  export async function preloadCompressions(options) {
34
- const compressions = Object.values(PARQUET_COMPRESSION_METHODS);
35
- return await Promise.all(compressions.map(compression => compression.preload()));
59
+ const compressions = Object.values(PARQUET_COMPRESSION_METHODS);
60
+ return await Promise.all(compressions.map((compression) => compression.preload()));
36
61
  }
62
+ /**
63
+ * Deflate a value using compression method `method`
64
+ */
37
65
  export async function deflate(method, value) {
38
- const compression = PARQUET_COMPRESSION_METHODS[method];
39
- if (!compression) {
40
- throw new Error(`parquet: invalid compression method: ${method}`);
41
- }
42
- const inputArrayBuffer = toArrayBuffer(value);
43
- const compressedArrayBuffer = await compression.compress(inputArrayBuffer);
44
- return toBuffer(compressedArrayBuffer);
66
+ const compression = PARQUET_COMPRESSION_METHODS[method];
67
+ if (!compression) {
68
+ throw new Error(`parquet: invalid compression method: ${method}`);
69
+ }
70
+ const inputArrayBuffer = toArrayBuffer(value);
71
+ const compressedArrayBuffer = await compression.compress(inputArrayBuffer);
72
+ return toBuffer(compressedArrayBuffer);
45
73
  }
74
+ /**
75
+ * Inflate a value using compression method `method`
76
+ */
46
77
  export async function decompress(method, value, size) {
47
- const compression = PARQUET_COMPRESSION_METHODS[method];
48
- if (!compression) {
49
- throw new Error(`parquet: invalid compression method: ${method}`);
50
- }
51
- const inputArrayBuffer = toArrayBuffer(value);
52
- const compressedArrayBuffer = await compression.decompress(inputArrayBuffer, size);
53
- return toBuffer(compressedArrayBuffer);
78
+ const compression = PARQUET_COMPRESSION_METHODS[method];
79
+ if (!compression) {
80
+ throw new Error(`parquet: invalid compression method: ${method}`);
81
+ }
82
+ const inputArrayBuffer = toArrayBuffer(value);
83
+ const compressedArrayBuffer = await compression.decompress(inputArrayBuffer, size);
84
+ return toBuffer(compressedArrayBuffer);
54
85
  }
86
+ /*
87
+ * Inflate a value using compression method `method`
88
+ */
55
89
  export function inflate(method, value, size) {
56
- if (!(method in PARQUET_COMPRESSION_METHODS)) {
57
- throw new Error(`invalid compression method: ${method}`);
90
+ if (!(method in PARQUET_COMPRESSION_METHODS)) {
91
+ throw new Error(`invalid compression method: ${method}`);
92
+ }
93
+ // @ts-ignore
94
+ return PARQUET_COMPRESSION_METHODS[method].inflate(value, size);
95
+ }
96
+ /*
97
+ function deflate_identity(value: Buffer): Buffer {
98
+ return value;
99
+ }
100
+
101
+ function deflate_gzip(value: Buffer): Buffer {
102
+ return zlib.gzipSync(value);
103
+ }
104
+
105
+ function deflate_snappy(value: Buffer): Buffer {
106
+ return snappyjs.compress(value);
107
+ }
108
+
109
+ function deflate_lzo(value: Buffer): Buffer {
110
+ lzo = lzo || Util.load('lzo');
111
+ return lzo.compress(value);
112
+ }
113
+
114
+ function deflate_brotli(value: Buffer): Buffer {
115
+ brotli = brotli || Util.load('brotli');
116
+ const result = brotli.compress(value, {
117
+ mode: 0,
118
+ quality: 8,
119
+ lgwin: 22
120
+ });
121
+ return result ? Buffer.from(result) : Buffer.alloc(0);
122
+ }
123
+
124
+ function deflate_lz4(value: Buffer): Buffer {
125
+ lz4js = lz4js || Util.load('lz4js');
126
+ try {
127
+ // let result = Buffer.alloc(lz4js.encodeBound(value.length));
128
+ // const compressedSize = lz4.encodeBlock(value, result);
129
+ // // remove unnecessary bytes
130
+ // result = result.slice(0, compressedSize);
131
+ // return result;
132
+ return Buffer.from(lz4js.compress(value));
133
+ } catch (err) {
134
+ throw err;
135
+ }
136
+ }
137
+ function inflate_identity(value: Buffer): Buffer {
138
+ return value;
139
+ }
140
+
141
+ function inflate_gzip(value: Buffer): Buffer {
142
+ return zlib.gunzipSync(value);
143
+ }
144
+
145
+ function inflate_snappy(value: Buffer): Buffer {
146
+ return snappyjs.uncompress(value);
147
+ }
148
+
149
+ function inflate_lzo(value: Buffer, size: number): Buffer {
150
+ lzo = lzo || Util.load('lzo');
151
+ return lzo.decompress(value, size);
152
+ }
153
+
154
+ function inflate_lz4(value: Buffer, size: number): Buffer {
155
+ lz4js = lz4js || Util.load('lz4js');
156
+ try {
157
+ // let result = Buffer.alloc(size);
158
+ // const uncompressedSize = lz4js.decodeBlock(value, result);
159
+ // // remove unnecessary bytes
160
+ // result = result.slice(0, uncompressedSize);
161
+ // return result;
162
+ return Buffer.from(lz4js.decompress(value, size));
163
+ } catch (err) {
164
+ throw err;
165
+ }
166
+ }
167
+
168
+ function inflate_brotli(value: Buffer): Buffer {
169
+ brotli = brotli || Util.load('brotli');
170
+ if (!value.length) {
171
+ return Buffer.alloc(0);
58
172
  }
59
- return PARQUET_COMPRESSION_METHODS[method].inflate(value, size);
173
+ return Buffer.from(brotli.decompress(value));
60
174
  }
61
- //# sourceMappingURL=compression.js.map
175
+ */
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import { stream } from '@loaders.gl/loader-utils';
4
- import { ParquetRowGroup, ParquetRow } from '../schema/declare';
5
- import { ParquetSchema } from '../schema/schema';
6
- import { RowGroup } from '../parquet-thrift';
4
+ import { ParquetRowGroup, ParquetRow } from "../schema/declare.js";
5
+ import { ParquetSchema } from "../schema/schema.js";
6
+ import { RowGroup } from "../parquet-thrift/index.js";
7
7
  export interface ParquetEncoderOptions {
8
8
  baseOffset?: number;
9
9
  rowGroupSize?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"parquet-encoder.d.ts","sourceRoot":"","sources":["../../../src/parquetjs/encoder/parquet-encoder.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAGhD,OAAO,EACL,eAAe,EAKf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAaL,QAAQ,EAGT,MAAM,mBAAmB,CAAC;AA2B3B,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC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