MCPcopy Create free account
hub / github.com/christkv/node-git / nextFile

Function nextFile

lib/zlib/zlib.js:661–789  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

659 };
660
661 function nextFile(){
662 if (debug)
663 util.debug("NEXTFILE");
664 outputArr = [];
665 var tmp = [];
666 modeZIP = false;
667 tmp[0] = readByte();
668 tmp[1] = readByte();
669
670 if (debug)
671 util.debug("type: " + tmp[0] + " " + tmp[1]);
672 if (tmp[0] == parseInt("78",16) && (tmp[1] == parseInt("156",10) || tmp[1] == parseInt("1", 10))){ //GZIP
673 if (debug)
674 util.debug("GEONExT-GZIP");
675 DeflateLoop();
676 if (debug)
677 util.debug(outputArr.join(''));
678 // unzipped[files] = new Array(2);
679 unzipped[files] = outputArr.join('');
680 files++;
681 }
682 if (tmp[0] == parseInt("1f",16) && tmp[1] == parseInt("8b",16)){ //GZIP
683 if (debug)
684 util.debug("GZIP");
685 //DeflateLoop();
686 skipdir();
687 if (debug)
688 util.debug(outputArr.join(''));
689 unzipped[files] = new Array(2);
690 unzipped[files][0] = outputArr.join('');
691 unzipped[files][1] = "file";
692 files++;
693 }
694 if (tmp[0] == parseInt("50",16) && tmp[1] == parseInt("4b",16)){ //ZIP
695 modeZIP = true;
696 tmp[2] = readByte();
697 tmp[3] = readByte();
698 if (tmp[2] == parseInt("3",16) && tmp[3] == parseInt("4",16)){
699 //MODE_ZIP
700 tmp[0] = readByte();
701 tmp[1] = readByte();
702 if (debug)
703 util.debug("ZIP-Version: "+tmp[1]+" "+tmp[0]/10+"."+tmp[0]%10);
704
705 gpflags = readByte();
706 gpflags |= (readByte()<<8);
707 if (debug)
708 util.debug("gpflags: "+gpflags);
709
710 var method = readByte();
711 method |= (readByte()<<8);
712 if (debug)
713 util.debug("method: "+method);
714
715 readByte();
716 readByte();
717 readByte();
718 readByte();

Callers 2

zlib.jsFile · 0.85
skipdirFunction · 0.85

Calls 3

readByteFunction · 0.85
DeflateLoopFunction · 0.85
skipdirFunction · 0.85

Tested by

no test coverage detected