360haven works best with JavaScript enabled
[Beta] Minecraft XBLA Compression Library
Loading
Register
Page 1 of 3 123 LastLast
Results 1 to 8 of 22
  1. #1
    Reverse Engineer


    fairchild is offline
    Join Date : Jan 2011
    Location : Spain / Sweden
    Posts : 211
    Array

    Minecraft XBLA Compression Library

    Due to the little time i can spend on development and research i decided to release this beta version of my Minecraft XBLA Compression Library.

    This is a Library written in (unmanaged) C/C++ that can be used in your .NET (C# example available) applications to decompress and compress the compressed data from the savegame.

    Make sure to give credits if used in your application.

    Example (C#):
    Code:
    [DllImport("libminecraft.dll", CallingConvention = CallingConvention.Cdecl)]
    public static extern uint decompress([Out] byte[] compressed_buffer, uint compressed_size, [In] byte[] decompressed_buffer, uint decompressed_size);
    public static extern uint compress([Out] byte[] decompressed_buffer, uint decompressed_size, [In] byte[] compressed_buffer, uint compressed_size);
    
    void MyFunction()
    {
                UInt32 decompressed_size = <decompressed size>;
                byte[] decompressed_buffer = new byte[decompressed_size];
    
                uint compressed_size = <compressed size>;
                uint result = decompress(compressed_buffer, compressed_size, decompressed_buffer, decompressed_size);
    
                // result now contains the real decompressed size and decompressed_buffer contains the decompressed data.
    }


    Attached Files Attached Files
    Downloads : 47 || Uploads : 4 || Rep Power : 2983 || Posts : 211 || Thanks : 71 || Thanked 736 Times in 108 Posts


    If you feel like donating some bit coins, please do so to address "1DNcjKhrVTGnKTyQYbjx8yTRoenTSySeoP", if you are interested in other projects visit www.chipit.se or www.baeckstrom.com, thanks!

  2. The Following 14 Users Say Thank You to fairchild For This Useful Post:

    + Show/Hide list of the thanked


  3. #2
    The Immortal God
    Rpg_Fan

    CloudStrife7x is offline
    Join Date : Dec 2010
    Location : Unknown
    Age : 29
    Posts : 18,760
    Array
    Twitter: @

    Re: Minecraft XBLA Compression Library

    great work done as always fairchild :D
    Downloads : 157 || Uploads : 0 || Rep Power : 22149 || Posts : 18,760 || Thanks : 4,451 || Thanked 3,095 Times in 2,607 Posts



  4. #3
    Retired Staff

    thegutta is offline
    Join Date : Jun 2011
    Location : On Top Of The World
    Posts : 10,475
    Array
    Twitter: @
    Excellent work Fairchild :)
    Downloads : 47 || Uploads : 0 || Rep Power : 13179 || Posts : 10,475 || Thanks : 3,231 || Thanked 1,396 Times in 1,224 Posts




  5. #4
    maskedstick

    Re: Minecraft XBLA Compression Library

    Thanks, this is amazing. Is there anyway we should know what the decompressed size is, or do we have to guess for now?

  6. #5
    Reverse Engineer


    fairchild is offline
    Join Date : Jan 2011
    Location : Spain / Sweden
    Posts : 211
    Array

    Re: Minecraft XBLA Compression Library

    Quote Originally Posted by maskedstick View Post
    Thanks, this is amazing. Is there anyway we should know what the decompressed size is, or do we have to guess for now?
    The decompressed size is in the header, or you can simply guess and then trim the byte array after you decompressed using the real decompressed size.

    I implemented this in NBTExplorer, but now i want to know which is the best map editor that is open source so that i can modify that to use xbox360 savegames. :)
    Downloads : 47 || Uploads : 4 || Rep Power : 2983 || Posts : 211 || Thanks : 71 || Thanked 736 Times in 108 Posts


    If you feel like donating some bit coins, please do so to address "1DNcjKhrVTGnKTyQYbjx8yTRoenTSySeoP", if you are interested in other projects visit www.chipit.se or www.baeckstrom.com, thanks!

  7. #6
    maskedstick

    Re: Minecraft XBLA Compression Library

    Okay, I have a few questions. Assuming that for each chunk, the chunk data starts with decimal value 128 (that seems to be common to every chunk), how many bytes after that does the header take up (where does the actual compressed data start relative to the beginning of the chunk)? And am I supposed to be passing the whole chunk, including the header, to your methods? Or should I only be passing the compressed data?

  8. #7
    Senior Member
    xI cHOcOLaTe is offline
    Join Date : Oct 2011
    Location : NY - FL
    Posts : 117
    Array
    Twitter: @

    Re: Minecraft XBLA Compression Library

    Damn dude. Good shit as always fairchild :3
    Downloads : 11 || Uploads : 0 || Rep Power : 2399 || Posts : 117 || Thanks : 18 || Thanked 99 Times in 23 Posts


    My signature won't fit. :(

  9. #8
    Reverse Engineer


    fairchild is offline
    Join Date : Jan 2011
    Location : Spain / Sweden
    Posts : 211
    Array

    Re: Minecraft XBLA Compression Library

    Quote Originally Posted by maskedstick View Post
    Okay, I have a few questions. Assuming that for each chunk, the chunk data starts with decimal value 128 (that seems to be common to every chunk), how many bytes after that does the header take up (where does the actual compressed data start relative to the beginning of the chunk)? And am I supposed to be passing the whole chunk, including the header, to your methods? Or should I only be passing the compressed data?
    Ok, this is how the chunk headers looks like.

    Code:
    Magic= 0x80, 0x00
    ChunkSize=<short / uint16>
    
    Could be one of these two:
    DecompSize=<long / uint32>
    Or:
    Version=<short / uint16>
    DecompSize=<short / uint16>
    
    CompressedData=starts with 0xFF...
    You should only send the compressed data in the compressed_buffer nothing else.
    Downloads : 47 || Uploads : 4 || Rep Power : 2983 || Posts : 211 || Thanks : 71 || Thanked 736 Times in 108 Posts


    If you feel like donating some bit coins, please do so to address "1DNcjKhrVTGnKTyQYbjx8yTRoenTSySeoP", if you are interested in other projects visit www.chipit.se or www.baeckstrom.com, thanks!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. [Release] Minecraft XBLA Editor
    By Idlehands88 in forum Xbox 360 Modding Programs
    Replies: 298
    Last Post: 09-03-2016, 03:33 AM
  2. Minecraft (XBLA) TU 27
    By bruno_kiko in forum Trainer Request
    Replies: 0
    Last Post: 05-05-2015, 02:18 PM
  3. [WIP] Generic Xbox360 Compression Library
    By fairchild in forum Xbox 360 Modding Programs
    Replies: 29
    Last Post: 08-14-2013, 04:11 AM
  4. Minecraft on XBLA working toward constant updates
    By jkipp82 in forum XBL Marketplace News
    Replies: 1
    Last Post: 01-23-2012, 06:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.
     

About 360haven

    360haven is an Forum Devoted To Game modding Fans from all over the world.

    An Awesome Community of Xbox 360 Gamers, Modders and Developers who Create & Share Tutorials, Applications, Gfx, Trainers and Gamesaves.

    A haven for the l33t.
    A scarce paradise for modders.

Like this page

Google+