| 337 | } |
| 338 | |
| 339 | inline TBlob BlobByKey(const TStringBuf key) const { |
| 340 | const auto it = Dict_.find(key); |
| 341 | |
| 342 | Y_ENSURE(it != Dict_.end(), "key " << key.data() << " not found"); |
| 343 | |
| 344 | const size_t off = it->second->Offset(); |
| 345 | const size_t len = it->second->Length(); |
| 346 | |
| 347 | /* |
| 348 | * TODO - overflow check |
| 349 | */ |
| 350 | |
| 351 | return Blob_.SubBlob(off, off + len); |
| 352 | } |
| 353 | |
| 354 | inline bool Compressed() const { |
| 355 | return UseDecompression; |