You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
274 B
17 lines
274 B
6 years ago
|
'use strict';
|
||
|
|
||
|
/**
|
||
|
* Check if a Buffer/Uint8Array is a BZIP2 file
|
||
|
*
|
||
|
* @param {Buffer} buf
|
||
|
* @api public
|
||
|
*/
|
||
|
|
||
|
module.exports = function (buf) {
|
||
|
if (!buf || buf.length < 3) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return buf[0] === 66 && buf[1] === 90 && buf[2] === 104;
|
||
|
};
|