Displaying 3 results from an estimated 3 matches for "uint32array".
2018 Nov 23
1
How to concatenate Ogg in the browser JS?
I found how to build CRC32 table for Ogg in JS, if anyone interested:
function _makeCRC32Table() {
// From https://stackoverflow.com/questions/53438815/hot-to-build-crc32-table-for-ogg
const polynomial = 79764919;
const mask = 2147483648;
const CRCTable = new Uint32Array(256);
for (let i = 256; i--;) {
let char = i << 24;
for (let j = 8; j--;) {
char = char & mask ? polynomial ^ char << 1 : char << 1;
}
CRCTable[i] = char;
}
return CRCTable;
}
22.11.2018, 17:43, "Vitaly Zdanevich&q...
2018 Nov 16
4
How to concatenate Ogg in the browser JS?
Please see the documentation: https://xiph.org/ogg/doc/framing.html
I would encourage you to use random serial numbers, as intended, also,
as any downstream consumers of your files will face limitations similar
to the ones you are facing if they want to do anything more with them.
But before you go too far down the route of changing the serial numbers,
can you tell us what software is
2018 Nov 22
0
How to concatenate Ogg in the browser JS?
...lt. I think that generating the table is better than having hardcoded one - for security against the case when somebody accidentally change one character and this table will continue to work in 99% of cases. My current JS code for building table:
function _makeCRCTable() {
const CRCTable = new Uint32Array(256);
for (let i = 256; i--;) {
let char = i;
for (let j = 8; j--;) {
char = char & 1 ? 3988292384 ^ char >>> 1 : char >>> 1;
}
CRCTable[i] = char;
}
return CRCTable;
}
I need to fix something here?
16.11.2018, 17:57, &...