将blob转换为数组

I have installed a Minecraft Bukkit Plugin which saves inventories of players using MySQL.

The table looks like this:

My problem is that I want to display the items on the website, but there are these "BLOB" formats. I think, they should be the block IDs (I only found methods to convert "BLOB" into img).

The "Blob's" have following format:

EDIT

When I try to display it on the website with this code:

$conn = new mysqli("$host", "$user", "$pass", "auction");
$sql = "SELECT content FROM inventory";
$result = $conn->query($sql);

while($row = $result->fetch_assoc()) {
    echo base64_encode($row["content"]);
}

The solution looks like the following string:

H4sIAAAAAAAAAIuuViqpLEhVslJy9vcNcAwOVqrVgQs5egaNckc2NxYAYPN3OyECAAA=

I recall that blocks had id's with numbers between 0 and 255. If they haven't extended it that would mean that every byte represents a block.

You will need to read the data, byte by byte and convert every byte to a number, representing the block id. Once you have that you will only have to display the appropriate picture, based on that id.

In the event where they actually extended the id system to two bytes, you will have to convert every two byte into a number between 0 and 65535.

Update:

This Question describes how to read binary data with PHP. After you converted it into a byte array you will only have to typecast every byte to an int.

I know now, whats going on with this strange string. Minecraft uses "NBT Decoding". Does anyone here know, how i can decode / encode with nbt ? greets