();
+ foreach (var section in index)
+ {
+ index_offset = section.Item1;
+ for (int section_size = section.Item2; section_size > 0; )
+ {
+ int entry_size = file.View.ReadByte (index_offset);
+ if (entry_size < 5)
+ break;
+ var entry = new PackedEntry {
+ Offset = Binary.BigEndian (file.View.ReadUInt32 (index_offset+1)),
+ Name = file.View.ReadString (index_offset+5, (uint)entry_size-5),
+ };
+ if (entry.Offset > file.MaxOffset)
+ return null;
+ index_offset += entry_size;
+ section_size -= entry_size;
+ dir.Add (entry);
+ }
+ }
+ DetectFileTypes (file, dir);
+ return new ArcFile (file, this, dir);
+ }
+ }
+
+ internal class ShsCompression : IDisposable
+ {
+ BinaryReader m_input;
+
+ public ShsCompression (Stream input, bool leave_open = false)
+ {
+ m_input = new BinaryReader (input, Encoding.UTF8, leave_open);
+ }
+
+ public int Unpack (byte[] output)
+ {
+ int dst = 0;
+ while (dst < output.Length)
+ {
+ int count;
+ int ctl = m_input.ReadByte();
+ if (ctl < 32)
+ {
+ switch (ctl)
+ {
+ case 0x1D:
+ count = m_input.ReadByte() + 0x1E;
+ break;
+ case 0x1E:
+ count = Binary.BigEndian (m_input.ReadUInt16()) + 0x11E;
+ break;
+ case 0x1F:
+ count = Binary.BigEndian (m_input.ReadInt32());
+ break;
+ default:
+ count = ctl + 1;
+ break;
+ }
+ count = Math.Min (count, output.Length - dst);
+ m_input.Read (output, dst, count);
+ }
+ else
+ {
+ int offset;
+ if (0 == (ctl & 0x80))
+ {
+ if (0x20 == (ctl & 0x60))
+ {
+ offset = (ctl >> 2) & 7;
+ count = ctl & 3;
+ }
+ else
+ {
+ offset = m_input.ReadByte();
+ if (0x40 == (ctl & 0x60))
+ count = (ctl & 0x1F) + 4;
+ else
+ {
+ offset |= (ctl & 0x1F) << 8;
+ ctl = m_input.ReadByte();
+ if (0xFE == ctl)
+ count = Binary.BigEndian (m_input.ReadUInt16()) + 0x102;
+ else if (0xFF == ctl)
+ count = Binary.BigEndian (m_input.ReadInt32());
+ else
+ count = ctl + 4;
+ }
+ }
+ }
+ else
+ {
+ count = (ctl >> 5) & 3;
+ offset = ((ctl & 0x1F) << 8) | m_input.ReadByte();
+ }
+ count += 3;
+ offset++;
+ count = Math.Min (count, output.Length-dst);
+ Binary.CopyOverlapped (output, dst-offset, dst, count);
+ }
+ dst += count;
+ }
+ return dst;
+ }
+
+ #region IDisposable Members
+ bool m_disposed = false;
+ public void Dispose ()
+ {
+ if (!m_disposed)
+ {
+ m_input.Dispose();
+ m_disposed = true;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/supported.html b/supported.html
index 0f02e609..66817d06 100644
--- a/supported.html
+++ b/supported.html
@@ -129,6 +129,7 @@ Maji de Watashi ni Koishinasai!
Brightia Plus
Hana Hiraku
Iinari
+Shiosai no Himei
*.gcp | CMP1 | No |
*.pd | PackOnly PackPlus FlyingShinePDFile | Yes | Flying Shine | Cross†Channel |
@@ -349,8 +350,10 @@ Shitai o Arau
*.gcc | G24n G24m R24n R24m | No |
*.arc | - | No | RPM |
+Heartful Days ~Hi no Ataru Basho e~
Kimi no Koe ga Kikoeru
Kimi no Omoi, Sono Negai
+Samurai Jupiter
Sora no Iro, Mizu no Iro
|
*.iks | NPSR | No | X[iks] | Shikkan ~Hazukashimerareta Karada, Oreta Kokoro~ |
@@ -483,6 +486,9 @@ Love Fetish series
Trouble Trap Laboratory
*.ngp | NGP | No |
+*.hxp | Him4 Him5 SHS6 SHS7 | No | SH System |
+Natsumero
+ |
Non-encrypted only