mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.1.1
This commit is contained in:
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*;
|
||||
public class Xotdb_dir_info {
|
||||
public Xotdb_dir_info(boolean ns_root, byte id, String name) {this.ns_root = ns_root; this.id = id; this.name = name;}
|
||||
public byte Id() {return id;} private byte id;
|
||||
@@ -30,25 +30,25 @@ public class Xotdb_dir_info {
|
||||
ext_bry = Wtr_ext(v);
|
||||
ext_str = String_.new_a7(ext_bry);
|
||||
return this;
|
||||
} byte ext_tid = gplx.ios.Io_stream_.Tid_raw;
|
||||
} byte ext_tid = gplx.core.ios.Io_stream_.Tid_raw;
|
||||
|
||||
public static final String Wtr_xdat_str = ".xdat", Wtr_zip_str = ".zip", Wtr_gz_str = ".gz", Wtr_bz2_str = ".bz2";
|
||||
public static final byte[] Wtr_xdat_bry = Bry_.new_a7(Wtr_xdat_str), Wtr_zip_bry = Bry_.new_a7(Wtr_zip_str), Wtr_gz_bry = Bry_.new_a7(Wtr_gz_str), Wtr_bz2_bry = Bry_.new_a7(Wtr_bz2_str);
|
||||
public static String Wtr_dir(byte v) {
|
||||
switch (v) {
|
||||
case gplx.ios.Io_stream_.Tid_raw : return "";
|
||||
case gplx.ios.Io_stream_.Tid_zip : return "_zip";
|
||||
case gplx.ios.Io_stream_.Tid_gzip : return "_gz";
|
||||
case gplx.ios.Io_stream_.Tid_bzip2 : return "_bz2";
|
||||
case gplx.core.ios.Io_stream_.Tid_raw : return "";
|
||||
case gplx.core.ios.Io_stream_.Tid_zip : return "_zip";
|
||||
case gplx.core.ios.Io_stream_.Tid_gzip : return "_gz";
|
||||
case gplx.core.ios.Io_stream_.Tid_bzip2 : return "_bz2";
|
||||
default : throw Err_.new_unhandled(v);
|
||||
}
|
||||
}
|
||||
public static byte[] Wtr_ext(byte v) {
|
||||
switch (v) {
|
||||
case gplx.ios.Io_stream_.Tid_raw : return Wtr_xdat_bry;
|
||||
case gplx.ios.Io_stream_.Tid_zip : return Wtr_zip_bry;
|
||||
case gplx.ios.Io_stream_.Tid_gzip : return Wtr_gz_bry;
|
||||
case gplx.ios.Io_stream_.Tid_bzip2 : return Wtr_bz2_bry;
|
||||
case gplx.core.ios.Io_stream_.Tid_raw : return Wtr_xdat_bry;
|
||||
case gplx.core.ios.Io_stream_.Tid_zip : return Wtr_zip_bry;
|
||||
case gplx.core.ios.Io_stream_.Tid_gzip : return Wtr_gz_bry;
|
||||
case gplx.core.ios.Io_stream_.Tid_bzip2 : return Wtr_bz2_bry;
|
||||
default : throw Err_.new_unhandled(v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,14 +56,14 @@ public class Xotdb_fsys_mgr {
|
||||
private static void Scan_dirs_zip(Xotdb_fsys_mgr fsys_mgr, byte id) {
|
||||
Io_url[] dirs = Io_mgr.Instance.QueryDir_args(fsys_mgr.Ns_dir().GenSubDir_nest("000")).FilPath_("*page*").DirOnly_().Recur_(false).ExecAsUrlAry();
|
||||
int len = dirs.length;
|
||||
byte tid = gplx.ios.Io_stream_.Tid_raw; // needed for Xoa_xowa_exec_tst
|
||||
byte tid = gplx.core.ios.Io_stream_.Tid_raw; // needed for Xoa_xowa_exec_tst
|
||||
for (int i = 0; i < len; i++) {
|
||||
Io_url dir = dirs[i];
|
||||
String dir_name = dir.NameOnly();
|
||||
if (String_.Eq(dir_name, "page")) {tid = gplx.ios.Io_stream_.Tid_raw; break;}
|
||||
else if (String_.Eq(dir_name, "page_zip")) tid = gplx.ios.Io_stream_.Tid_zip;
|
||||
else if (String_.Eq(dir_name, "page_gz")) tid = gplx.ios.Io_stream_.Tid_gzip;
|
||||
else if (String_.Eq(dir_name, "page_bz2")) tid = gplx.ios.Io_stream_.Tid_bzip2;
|
||||
if (String_.Eq(dir_name, "page")) {tid = gplx.core.ios.Io_stream_.Tid_raw; break;}
|
||||
else if (String_.Eq(dir_name, "page_zip")) tid = gplx.core.ios.Io_stream_.Tid_zip;
|
||||
else if (String_.Eq(dir_name, "page_gz")) tid = gplx.core.ios.Io_stream_.Tid_gzip;
|
||||
else if (String_.Eq(dir_name, "page_bz2")) tid = gplx.core.ios.Io_stream_.Tid_bzip2;
|
||||
}
|
||||
fsys_mgr.Tdb_dir_regy()[id].Ext_tid_(tid);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Xow_fsys_mgr_fxt {
|
||||
wiki = Xoa_app_fxt.wiki_tst_(app);
|
||||
}
|
||||
Xoae_app app; Xowe_wiki wiki;
|
||||
public Xow_fsys_mgr_fxt Zip_(byte tid, boolean v) {wiki.Tdb_fsys_mgr().Tdb_dir_regy()[tid].Ext_tid_(v ? gplx.ios.Io_stream_.Tid_zip : gplx.ios.Io_stream_.Tid_raw); return this;}
|
||||
public Xow_fsys_mgr_fxt Zip_(byte tid, boolean v) {wiki.Tdb_fsys_mgr().Tdb_dir_regy()[tid].Ext_tid_(v ? gplx.core.ios.Io_stream_.Tid_zip : gplx.core.ios.Io_stream_.Tid_raw); return this;}
|
||||
public void Url_ns_fil(byte tid, int ns_id, int fil_idx, String expd) {
|
||||
Tfds.Eq(expd, wiki.Tdb_fsys_mgr().Url_ns_fil(tid, ns_id, fil_idx).Raw());
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.brys.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.core.brys.*; import gplx.core.encoders.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
public class Xotdb_page_itm_ {
|
||||
static final int Txt_len_id = 5, Txt_len_fil_idx = 5, Txt_len_row_idx = 5, Txt_len_type = 1, Txt_len_text_len = 5;
|
||||
public static final int Txt_ttl_pos = Txt_len_id + Txt_len_fil_idx + Txt_len_row_idx + Txt_len_type + Txt_len_text_len + 5;
|
||||
@@ -30,11 +30,11 @@ public class Xotdb_page_itm_ {
|
||||
private static void Txt_ttl_load(Xowd_page_itm page, byte[] bry, int bgn, int end) {
|
||||
try {
|
||||
page.Init_by_tdb
|
||||
( Base85_utl.XtoIntByAry (bry, bgn + 0, bgn + 4)
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 6, bgn + 10)
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 12, bgn + 16)
|
||||
( Base85_.To_int_by_bry (bry, bgn + 0, bgn + 4)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 6, bgn + 10)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 12, bgn + 16)
|
||||
, bry[18] == Byte_ascii.Num_1
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 20, bgn + 24)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 20, bgn + 24)
|
||||
, page.Ns_id()
|
||||
, Bry_.Mid (bry, bgn + 26, end)
|
||||
);
|
||||
@@ -55,12 +55,12 @@ public class Xotdb_page_itm_ {
|
||||
try {
|
||||
page.Clear();
|
||||
page.Init_by_tdb
|
||||
( Base85_utl.XtoIntByAry (bry, bgn + 0, bgn + 4)
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 6, bgn + 10)
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 12, bgn + 16)
|
||||
( Base85_.To_int_by_bry (bry, bgn + 0, bgn + 4)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 6, bgn + 10)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 12, bgn + 16)
|
||||
, bry[18] == Byte_ascii.Num_1
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 20, bgn + 24)
|
||||
, Base85_utl.XtoIntByAry (bry, bgn + 26, bgn + 30)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 20, bgn + 24)
|
||||
, Base85_.To_int_by_bry (bry, bgn + 26, bgn + 30)
|
||||
, Bry_.Mid (bry, bgn + 32, end)
|
||||
);
|
||||
} catch (Exception e) {throw Err_.new_exc(e, "xo", "parse_by_id failed", "id", String_.new_u8(bry, bgn, end));}
|
||||
@@ -76,8 +76,8 @@ public class Xotdb_page_itm_ {
|
||||
}
|
||||
public static void Txt_page_save(Bry_bfr bfr, int id, DateAdp modified_on, byte[] title, byte[] text, boolean add_nl) {
|
||||
int ts = Bit_.Xto_int_date_short(modified_on.XtoSegAry());
|
||||
bfr .Add_base85(id , Base85_utl.Len_int) .Add_byte(Txt_page_dlm) // needed for mass template load
|
||||
.Add_base85(ts , Base85_utl.Len_int) .Add_byte(Txt_page_dlm)
|
||||
bfr .Add_base85(id , Base85_.Len_int) .Add_byte(Txt_page_dlm) // needed for mass template load
|
||||
.Add_base85(ts , Base85_.Len_int) .Add_byte(Txt_page_dlm)
|
||||
.Add(title) .Add_byte(Txt_page_dlm) // needed for rebuilding ttl files
|
||||
.Add(text) .Add_byte(Txt_page_dlm);
|
||||
if (add_nl)
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.brys.*; import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.core.brys.*; import gplx.core.ios.*; import gplx.core.encoders.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.xowa.wikis.tdbs.bldrs.*;
|
||||
public class Xotdb_page_raw_parser {
|
||||
@@ -43,10 +43,10 @@ public class Xotdb_page_raw_parser {
|
||||
public boolean Read(Xowd_page_itm page) {
|
||||
boolean read = false;
|
||||
read = rdr.Read_next(); if (!read) return false;
|
||||
int id = Base85_utl.XtoIntByAry(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 2);
|
||||
int id = Base85_.To_int_by_bry(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 2);
|
||||
page.Id_(id);
|
||||
read = rdr.Read_next(); if (!read) throw Err_.new_wo_type("could not read timestamp");
|
||||
int timestamp = Base85_utl.XtoIntByAry(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 1);
|
||||
int timestamp = Base85_.To_int_by_bry(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 1);
|
||||
page.Modified_on_(Bit_.Xto_date_short(timestamp));
|
||||
read = rdr.Read_next(); if (!read) throw Err_.new_wo_type("could not read ttl");
|
||||
byte[] ttl = Bry_.Mid(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 1);
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*;
|
||||
public class Io_line_rdr_key_gen_all implements Io_line_rdr_key_gen {
|
||||
public void Gen(Io_line_rdr bfr) {
|
||||
bfr.Key_pos_bgn_(bfr.Itm_pos_bgn()).Key_pos_end_(bfr.Itm_pos_end());
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.hives; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*;
|
||||
import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.bldrs.sqls.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
@@ -37,7 +37,7 @@ public class Xob_hive_mgr {
|
||||
}
|
||||
Xob_xdat_file xdat_load_(Xob_xdat_file xdat, byte dir_tid, Xow_ns ns, int fil_idx) {
|
||||
Io_url xdat_url = fsys_mgr.Url_ns_fil(dir_tid, ns.Id(), fil_idx);
|
||||
byte[] xdat_bry = gplx.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
byte[] xdat_bry = gplx.core.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
xdat.Parse(xdat_bry, xdat_bry.length, xdat_url);
|
||||
return xdat;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class Xob_hive_mgr {
|
||||
byte dir_tid = Xotdb_dir_info_.Tid_ttl;
|
||||
int xdat_idx = Regy__find_file_ns(key, dir_tid, ns.Num_str());
|
||||
Io_url xdat_url = fsys_mgr.Url_ns_fil(dir_tid, ns.Id(), xdat_idx);
|
||||
byte[] xdat_bry = gplx.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
byte[] xdat_bry = gplx.core.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
xdat.Parse(xdat_bry, xdat_bry.length, xdat_url);
|
||||
xdat.Find(xdat_itm, key, Xotdb_page_itm_.Txt_ttl_pos, Byte_ascii.Tab, false);
|
||||
Find_nearby_add_fwd(list, dir_tid, ns, include_redirects, count, xdat_idx, xdat_itm.Itm_idx());
|
||||
@@ -132,7 +132,7 @@ public class Xob_hive_mgr {
|
||||
// while (loop) {
|
||||
// if (fil_idx == -1) break;
|
||||
// Io_url xdat_url = fsys_mgr.Url_ns_fil(dir_tid, ns.Id(), fil_idx);
|
||||
// byte[] xdat_bry = gplx.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
// byte[] xdat_bry = gplx.core.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
// xdat.Parse(xdat_bry, xdat_bry.length, xdat_url);
|
||||
// int row_idx = first && row_bgn != -1 ? row_bgn : xdat.Count() - 1;
|
||||
// first = false;
|
||||
@@ -155,7 +155,7 @@ public class Xob_hive_mgr {
|
||||
while (loop) {
|
||||
if (fil_idx == regy_len) break;
|
||||
Io_url xdat_url = fsys_mgr.Url_ns_fil(dir_tid, ns.Id(), fil_idx);
|
||||
byte[] xdat_bry = gplx.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
byte[] xdat_bry = gplx.core.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
xdat.Parse(xdat_bry, xdat_bry.length, xdat_url);
|
||||
int row_idx = first ? row_bgn : 0;
|
||||
int rows_len = xdat.Count();
|
||||
@@ -186,7 +186,7 @@ public class Xob_hive_mgr {
|
||||
int Regy__find_file_by_url(byte[] key, Io_url regy_url) {regy.Init(regy_url); return regy.Files_find(key);} private Xowd_regy_mgr regy = new Xowd_regy_mgr();
|
||||
private void Xdat__create_row(byte dir_tid, byte[] key, byte[] row, int xdat_idx) {
|
||||
Io_url xdat_url = fsys_mgr.Url_site_fil(dir_tid, xdat_idx);
|
||||
byte[] xdat_bry = gplx.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
byte[] xdat_bry = gplx.core.ios.Io_stream_rdr_.Load_all(xdat_url);
|
||||
Xob_xdat_file xdat_fil = new Xob_xdat_file();
|
||||
if (xdat_bry.length > 0) // if file is not empty, load it and parse it
|
||||
xdat_fil.Parse(xdat_bry, xdat_bry.length, xdat_url);
|
||||
|
||||
@@ -16,9 +16,8 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.hives; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.wikis.tdbs.xdats.*;
|
||||
import gplx.core.encoders.*;
|
||||
import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.tdbs.xdats.*;
|
||||
public class Xow_hive_mgr_fxt {
|
||||
public void Clear() {
|
||||
if (hive_mgr == null) {
|
||||
@@ -80,14 +79,14 @@ public class Xow_hive_mgr_fxt {
|
||||
public Xow_hive_mgr_fxt Create_id(int id, int fil_idx, int row_idx, boolean type_redirect, int itm_len, int ns_id, String ttl) {Create_id(app, hive_mgr, id, fil_idx, row_idx, type_redirect, itm_len, ns_id, ttl); return this;}
|
||||
public static void Create_id(Xoae_app app, Xob_hive_mgr hive_mgr, int id, int fil_idx, int row_idx, boolean type_redirect, int itm_len, int ns_id, String ttl) {
|
||||
Bry_bfr bfr = app.Utl__bfr_mkr().Get_b512();
|
||||
byte[] key_bry = Base85_utl.XtoStrByAry(id, 5);
|
||||
byte[] key_bry = Base85_.To_bry(id, 5);
|
||||
bfr .Add(key_bry) .Add_byte_pipe()
|
||||
.Add_base85_len_5(fil_idx) .Add_byte_pipe()
|
||||
.Add_base85_len_5(row_idx) .Add_byte_pipe()
|
||||
.Add_byte(type_redirect ? Byte_ascii.Num_1 : Byte_ascii.Num_0).Add_byte_pipe()
|
||||
.Add_base85_len_5(itm_len) .Add_byte_pipe()
|
||||
.Add_base85_len_5(ns_id) .Add_byte_pipe()
|
||||
.Add_str(ttl) .Add_byte_nl();
|
||||
.Add_str_u8(ttl) .Add_byte_nl();
|
||||
byte[] row = bfr.To_bry_and_clear();
|
||||
bfr.Mkr_rls();
|
||||
hive_mgr.Create(Xotdb_dir_info_.Tid_id, key_bry, row);
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*;
|
||||
public class Xos_url_gen implements Io_url_gen {
|
||||
public Xos_url_gen(Io_url root) {this.root = root;} Io_url root; int idx = 0;
|
||||
public byte[] Ext() {return ext;} public Xos_url_gen Ext_(byte[] v) {ext = v; return this;} private byte[] ext = Bry_.new_a7(".csv");
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import org.junit.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*;
|
||||
public class Xos_url_gen_tst {
|
||||
@Test public void Url_gen() {
|
||||
tst_url_gen("mem/root/", 0, "mem/root/00/00/00/00/0000000000.csv");
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.xdats; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.ios.*;
|
||||
import gplx.core.ios.*; import gplx.core.encoders.*;
|
||||
public class Xob_xdat_file {
|
||||
public byte[] Src() {return src;} private byte[] src;
|
||||
public int Src_len() {return src_len;} public Xob_xdat_file Src_len_(int v) {src_len = v; return this;} private int src_len; // NOTE: src_len can be different than src.length (occurs when reusing brys)
|
||||
@@ -154,7 +154,7 @@ public class Xob_xdat_file {
|
||||
slot_bgn = itm_count * Len_idx_itm;
|
||||
if (slot_bgn >= src_len) break;
|
||||
if (src[slot_bgn] == Byte_ascii.Nl) break;
|
||||
int tmp_val = Base85_utl.XtoIntByAry(src, slot_bgn, slot_bgn + Offset_base85);
|
||||
int tmp_val = Base85_.To_int_by_bry(src, slot_bgn, slot_bgn + Offset_base85);
|
||||
slot_new = slot_old + tmp_val;
|
||||
int new_idx = itm_count + 1;
|
||||
if (tmp_len < new_idx) {
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.tdbs.xdats; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.ios.*; import gplx.xowa.wikis.tdbs.*;
|
||||
import gplx.core.ios.*; import gplx.core.encoders.*; import gplx.xowa.wikis.tdbs.*;
|
||||
public class Xob_xdat_file_wtr {
|
||||
public static Xob_xdat_file_wtr new_file_(int fil_max, Io_url root_dir) {return new Xob_xdat_file_wtr(fil_max, root_dir, Io_stream_.Tid_raw);}
|
||||
public static Xob_xdat_file_wtr new_by_tid_(int fil_max, Io_url root_dir, byte dir_tid, byte tid) {return new Xob_xdat_file_wtr(fil_max, root_dir.GenSubDir(Xotdb_dir_info_.Tid_name(dir_tid) + Xotdb_dir_info.Wtr_dir(tid)), tid);}
|
||||
@@ -69,7 +69,7 @@ public class Xob_xdat_file_wtr {
|
||||
for (int i = 0; i < idx_pos; i++) {
|
||||
int idx_bry_pos = i * Len_idx_itm;
|
||||
int cur_pos = idx[i];
|
||||
Base85_utl.XtoStrByAry(cur_pos - prv_pos, idx_bry, idx_bry_pos, Len_base85);
|
||||
Base85_.Set_bry(cur_pos - prv_pos, idx_bry, idx_bry_pos, Len_base85);
|
||||
idx_bry[idx_bry_pos + Len_base85] = Dlm_fld;
|
||||
prv_pos = cur_pos;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class Xob_xdat_file_wtr {
|
||||
// for (int i = 0; i < idx_pos; i++) {
|
||||
// int idx_bry_pos = i * Len_idx_itm;
|
||||
// int cur_pos = idx[i];
|
||||
// Base85_utl.XtoStrByAry(cur_pos - prv_pos, idx_bry, idx_bry_pos, Len_base85);
|
||||
// Base85_.Set_bry(cur_pos - prv_pos, idx_bry, idx_bry_pos, Len_base85);
|
||||
// idx_bry[idx_bry_pos + Len_base85] = Dlm_idx;
|
||||
// prv_pos = cur_pos;
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user