public int read ( BitReader bitreader ) throws JSONException { try { this . width = 0 ; Symbol symbol = this . table ; while ( symbol . integer == none ) { this . width += 1 ; symbol = bitreader . bit ( ) ? symbol . one : symbol . zero ; } tick ( symbol . integer ) ; if ( JSONzip . probe ) { JSONzip . logchar ( symbol . integer , this . width ) ; } return symbol . integer ; } catch ( Throwable e ) { throw new JSONException ( e ) ; } }
Read bits until a symbol can be identified . The weight of the read symbol will be incremented .