code: func (p *binParser) line(write bool) (int, bool, []byte) {
  
  	// Read an integer (the level)
  	level := p.varInt()
  	if level < 1 {
  		return 0, false, nil
  	}
  
  	// create a byte buffer to accumulate the bytes read.
  	buf := bytes.Buffer{}
  
  	// read first byte of the node content.
  	n := p.read()
  
  	// Binary node if n==1
  	if n == 1 {
  		// Read length, then bytes
  		for {
  			n = p.varInt()
  			if n < 0 {
  				break
  			}
  			for ; n != 0; n-- {
  				c := p.read()
  				if c < 0 {
  					return level, true, buf.Bytes()
  				}
  				if write {
  					buf.WriteByte(byte(c))
  				}
  			}
  		}
  		return level, true, buf.Bytes()
  	}
  
  	// Text node. Read bytes until 0
  
  	if write {
  		buf.WriteByte(byte(n))
  	}
  
  	for {
  		c := p.read()
  		if c == 0 {
  			return level, false, buf.Bytes()
  		}
  		if write {
  			buf.WriteByte(byte(c))
  		}
  	}
  }
docs: // line is the parser production that reads one line out of the binary OGDL stream.
  //
  //     line  ::= level node 0x00
  //     level ::= varInt
  //     node  ::= text-node | binary-node
  //
  // This function returns:
  // - the level (1..)
  // - the byte stream
  // - a boolean that is true for binary nodes, false for text nodes
  //
  // This function accepts one boolean parameter that can be set to false if the
  // actual byte content is not needed and we just want to walk through the
  // stream. This functionality is used in log.go.