Comparing version 0.9.7 to 0.9.8
{ | ||
"name": "hyparquet", | ||
"version": "0.9.7", | ||
"version": "0.9.8", | ||
"description": "parquet file parser for javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -58,13 +58,6 @@ import { readVarInt } from './thrift.js' | ||
let value = 0 | ||
if (width === 1) { | ||
value = reader.view.getUint8(reader.offset) | ||
// assert(value < 1 << bitWidth) | ||
} else if (width === 2) { | ||
value = reader.view.getUint16(reader.offset, true) | ||
} else if (width === 4) { | ||
value = reader.view.getUint32(reader.offset, true) | ||
} else if (width) { | ||
throw new Error(`parquet invalid rle width ${width}`) | ||
for (let i = 0; i < width; i++) { | ||
value |= reader.view.getUint8(reader.offset++) << (i << 3) | ||
} | ||
reader.offset += width | ||
// assert(value < 1 << bitWidth) | ||
@@ -71,0 +64,0 @@ // repeat value count times |
@@ -118,6 +118,3 @@ // TCompactProtocol types | ||
* Var ints take 1 to 5 bytes (int32) or 1 to 10 bytes (int64). | ||
* Takes a Big Endian unsigned integer, left-pads the bit-string to make it a | ||
* multiple of 7 bits, splits it into 7-bit groups, prefix the most-significant | ||
* 7-bit group with the 0 bit, prefixing the remaining 7-bit groups with the | ||
* 1 bit and encode the resulting bit-string as Little Endian. | ||
* Reads groups of 7 low bits until high bit is 0. | ||
* | ||
@@ -124,0 +121,0 @@ * @param {DataReader} reader |
/** | ||
* Replace bigints with numbers. | ||
* When parsing parquet files, bigints are used to represent 64-bit integers. | ||
* However, JSON does not support bigints, so it's helpful to convert to numbers. | ||
* Replace bigint, date, etc with legal JSON types. | ||
* | ||
@@ -6,0 +4,0 @@ * @param {any} obj object to convert |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101723
2658