| 209 | TString Tmp; |
| 210 | |
| 211 | bool Load(IInputStream& in, const bool allowEmptyKey, const bool noValues) { |
| 212 | Y_UNUSED(noValues); |
| 213 | while (in.ReadLine(Tmp)) { |
| 214 | if (!Tmp && !allowEmptyKey) { |
| 215 | continue; |
| 216 | } |
| 217 | |
| 218 | size_t sep = Tmp.find('\t'); |
| 219 | if (sep == TString::npos) { |
| 220 | RemoveIfLast<TString>(Tmp, '\n'); |
| 221 | Key = TKeyReader()(Tmp.data(), Tmp.size()); |
| 222 | Value = TValue(); |
| 223 | } else { |
| 224 | Key = TKeyReader()(Tmp.data(), sep); |
| 225 | Value = TValue(); |
| 226 | while (sep != Tmp.size()) { |
| 227 | size_t sep2 = Tmp.find('\t', sep + 1); |
| 228 | if (sep2 == TString::npos) { |
| 229 | sep2 = Tmp.size(); |
| 230 | } |
| 231 | |
| 232 | if (sep + 1 != sep2) { |
| 233 | Value.push_back(TValueReader()(Tmp.data() + sep + 1, sep2 - sep - 1)); |
| 234 | } |
| 235 | sep = sep2; |
| 236 | } |
| 237 | } |
| 238 | return true; |
| 239 | } |
| 240 | return false; |
| 241 | } |
| 242 | }; |
| 243 | |
| 244 | template <typename TVectorType> |