UNPKG
@multiplayer-app/otlp-core
Version:
latest (0.1.2)
0.1.2
0.1.1
0.1.0
0.0.10
0.0.9
0.0.8
0.0.8-alpha.0
0.0.7
0.0.6
0.0.6-alpha.1
0.0.6-alpha.0
0.0.5
0.0.5-alpha.5
0.0.5-alpha.4
0.0.5-alpha.3
0.0.5-alpha.2
0.0.5-alpha.1
0.0.5-alpha.0
0.0.4
0.0.4-alpha.2
0.0.4-alpha.1
0.0.4-alpha.0
0.0.3
0.0.2
0.0.1
Multiplayer otlp core
@multiplayer-app/otlp-core
/
src
/
helpers
/
is-gzip.ts
8 lines
(6 loc)
•
173 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
export
const
isGzip
= (
buf: Buffer |
Uint8Array
) => {
if
(!buf || buf.
length
<
3
) {
return
false
}
return
buf[
0
] ===
0x1F
&& buf[
1
] ===
0x8B
&& buf[
2
] ===
0x08
}