Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
fix wrong merge
Commit Description:
fix wrong merge
'use strict' ;
var DataReader = require ( './DataReader' );
var utils = require ( '../utils' );
function StringReader ( data ) {
DataReader . call ( this , data );
}
utils . inherits ( StringReader , DataReader );
/**
* @see DataReader.byteAt
*/
StringReader . prototype . byteAt = function ( i ) {
return this . data . charCodeAt ( this . zero + i );
};
/**
* @see DataReader.lastIndexOfSignature
*/
StringReader . prototype . lastIndexOfSignature = function ( sig ) {
return this . data . lastIndexOf ( sig ) - this . zero ;
};
/**
* @see DataReader.readAndCheckSignature
*/
StringReader . prototype . readAndCheckSignature = function ( sig ) {
var data = this . readData ( 4 );
return sig === data ;
};
/**
* @see DataReader.readData
*/
StringReader . prototype . readData = function ( size ) {
this . checkOffset ( size );
// this will work because the constructor applied the "& 0xff" mask.
var result = this . data . slice ( this . zero + this . index , this . zero + this . index + size );
this . index += size ;
return result ;
};
module . exports = StringReader ;
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings