IK
Size: a a a
IK
IK
АМ
АП
DH
DH
АМ
DH
ВП
AS
const Chance = require('chance');
const chance = new Chance();
const http = require('http');
http.createServer((req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'}); //[1]
while(chance.bool({likelihood: 95})) { //[2]
res.write(chance.string() + '\n'); //[3]
}
res.end('\nThe end...\n'); //[4]
res.on('finish', () => console.log('All data was sent')); //[5]
}).listen(8080, () => console.log('Listening on http://localhost:8080'));
M
<Buffer 1f 8b 08 00 00 00 00 00 00 00 ab 56 ca 4c 51 b2 32 ac 05 00 c5 f8 5d 44 08 00 00 00>
data.toString()
'\x1F\b\x00\x00\x00\x00\x00\x00\x00VLQ2\x05\x00]D\b\x00\x00\x00'
ES
data.toString(
‘utf8’)
- так может?M
{
string: '\x1F\b\x00\x00\x00\x00\x00\x00\x00VLQ2\x05\x00]D\b\x00\x00\x00',
data: <Buffer 1f 8b 08 00 00 00 00 00 00 00 ab 56 ca 4c 51 b2 32 ac 05 00 c5 f8 5d 44 08 00 00 00>
}
```АП
AS
TS
AS
АП
Г
M
console.dir({ string: data.toString('utf8'), data }, { depth: 6 });
{
string: '\x1F\b\x00\x00\x00\x00\x00\x00\x00VLQ2\x05\x00]D\b\x00\x00\x00',
data: Buffer(28) [Uint8Array] [
31, 139, 8, 0, 0, 0, 0, 0,
0, 0, 171, 86, 202, 76, 81, 178,
50, 172, 5, 0, 197, 248, 93, 68,
8, 0, 0, 0
]
}