@Override
  protected Stream<Pair<Bytes32, Bytes>> storageToPairStream(
      final SegmentedKeyValueStorage storage,
      final Hash accountHash,
      final Bytes startKeyHash,
      final Function<Bytes, Bytes> valueMapper) {

    return storage
        .streamFromKey(
            ACCOUNT_STORAGE_STORAGE, Bytes.concatenate(accountHash, startKeyHash).toArrayUnsafe())
        .takeWhile(pair -> Bytes.wrap(pair.getKey()).slice(0, Hash.SIZE).equals(accountHash))
        .map(
            pair ->
                new Pair<>(
                    Bytes32.wrap(Bytes.wrap(pair.getKey()).slice(Hash.SIZE)),
                    valueMapper.apply(Bytes.wrap(pair.getValue()).trimLeadingZeros())));
  }
This class represents a FlatDbReaderStrategy, which is responsible for reading and writing data
from flat databases. It implements various methods for storing and retrieving account data, code
data, and storage data from the corresponding KeyValueStorage.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/flat/BonsaiFlatDbStrategy.java