()
| 167 | } |
| 168 | |
| 169 | func (d *Decoder) doReadEntryNameV4() (string, error) { |
| 170 | l, err := binary.ReadVariableWidthInt(d.r) |
| 171 | if err != nil { |
| 172 | return "", err |
| 173 | } |
| 174 | |
| 175 | var base string |
| 176 | if d.lastEntry != nil { |
| 177 | base = d.lastEntry.Name[:len(d.lastEntry.Name)-int(l)] |
| 178 | } |
| 179 | |
| 180 | name, err := binary.ReadUntil(d.r, '\x00') |
| 181 | if err != nil { |
| 182 | return "", err |
| 183 | } |
| 184 | |
| 185 | return base + string(name), nil |
| 186 | } |
| 187 | |
| 188 | func (d *Decoder) doReadEntryName(len uint16) (string, error) { |
| 189 | name := make([]byte, len) |
no test coverage detected