OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Package git85 implements the radix 85 data encoding | 5 // Package git85 implements the radix 85 data encoding |
6 // used in the Git version control system. | 6 // used in the Git version control system. |
7 package git85 | 7 package git85 |
8 | 8 |
9 import ( | 9 import ( |
10 "bytes" | 10 "bytes" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 continue | 266 continue |
267 } | 267 } |
268 nn, d.err = Decode(d.outbuf[0:], d.buf[0:nl+1]) | 268 nn, d.err = Decode(d.outbuf[0:], d.buf[0:nl+1]) |
269 if e, ok := d.err.(CorruptInputError); ok { | 269 if e, ok := d.err.(CorruptInputError); ok { |
270 d.err = CorruptInputError(int64(e) + d.off) | 270 d.err = CorruptInputError(int64(e) + d.off) |
271 } | 271 } |
272 d.out = d.outbuf[0:nn] | 272 d.out = d.outbuf[0:nn] |
273 d.nbuf = copy(d.buf[0:], d.buf[nl+1:d.nbuf]) | 273 d.nbuf = copy(d.buf[0:], d.buf[nl+1:d.nbuf]) |
274 d.off += int64(nl + 1) | 274 d.off += int64(nl + 1) |
275 } | 275 } |
276 » panic("unreacahable") | 276 » panic("unreachable") |
277 } | 277 } |
OLD | NEW |