presto-geospatial-toolkit/src/main/java/io/prestosql/geospatial/serde/GeometrySerde.java/GeometrySerde/deserializeEnvelope
class GeometrySerde:    @Nullable
    public static Envelope deserializeEnvelope(Slice shape)
    {
        requireNonNull(shape, "shape is null");
        BasicSliceInput input = shape.getInput();
        verify(input.available() > 0);

        int length = input.available() - 1;
        GeometrySerializationType type = GeometrySerializationType.getForCode(input.readByte());
        return getEnvelope(input, type, length);
    }