anchor.diff:  
     ForceDirectories(ExtractFilePath(aFileName));
   
  -  InputStream := TMemoryStream.Create;
  +  OutputStream := TFileStream.Create(aFileName, fmCreate);
  +  InputStream := TCompressionStream.Create(clMax, OutputStream);
   
     //Sprite info
     InputStream.Write(fRXData.Count, 4);
  
positive.code: var
    I, Count: Integer;
    SAT: TSpriteAtlasType;
    InputStream: TMemoryStream;
    OutputStream: TFileStream;
    CompressionStream: TCompressionStream;
    baseRAM, idealRAM, colorRAM, texCount: Cardinal;
  begin
    if IsEmpty then Exit;
  
negative.code:       end;
    end;
  
    InputStream.Free;
    OutputStream.Free;
  end;
  
  
  procedure TKMSpritePackEdit.SaveToRXXFile(const aFileName: string);
  var
    I: Integer;
    InputStream: TMemoryStream;
    OutputStream: TFileStream;
    CompressionStream: TCompressionStream;
  begin
    // No image was loaded yet
    //@Rey: Perhaps we should erase the file in such case, otherwise mapmaker will have to go into folder to delete rxx himself if he decided to "clear" it
    if IsEmpty then Exit;
  
    ForceDirectories(ExtractFilePath(aFileName));
  
    InputStream := TMemoryStream.Create;
  
    InputStream.Write(fRXData.Count, 4);
    InputStream.Write(fRXData.Flag[1], fRXData.Count);
  
    for I := 1 to fRXData.Count do
      if fRXData.Flag[I] = 1 then
      begin
        InputStream.Write(fRXData.Size[I].X, SizeOf(fRXData.Size[I]));
        InputStream.Write(fRXData.Pivot[I].X, SizeOf(fRXData.Pivot[I]));
  
        if fRT = rxUnits then
          InputStream.Write(fRXData.SizeNoShadow[I].left, SizeOf(fRXData.SizeNoShadow[I]));
        InputStream.Write(fRXData.RGBA[I, 0], 4 * fRXData.Size[I].X * fRXData.Size[I].Y);
        InputStream.Write(fRXData.HasMask[I], 1);
        if fRXData.HasMask[I] then
          InputStream.Write(fRXData.Mask[I, 0], fRXData.Size[I].X * fRXData.Size[I].Y);
      end;
    OutputStream := TFileStream.Create(aFileName, fmCreate);
    CompressionStream := TCompressionStream.Create(clMax, OutputStream);
    InputStream.Position := 0;
  