mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-17 21:24:19 +00:00
9 lines
371 B
JavaScript
9 lines
371 B
JavaScript
const chunk = require('../chunk');
|
|
|
|
function decodeTrackerNameChunk(trackerNameChunk) {
|
|
if (trackerNameChunk.chunk_data !== undefined && trackerNameChunk.data_len !== undefined) {
|
|
trackerNameChunk.tracker_name = trackerNameChunk.chunk_data.subarray(0, trackerNameChunk.data_len).toString();
|
|
}
|
|
}
|
|
module.exports = (buffer) => chunk(buffer, decodeTrackerNameChunk);
|