See, how encoder mappings could be optimized:

Example of JIS-X-0201 charset before optimization:
=========================================
JIS_X0201 --> offset: 0000, ^mask: 0000
Old mapping: pageSize: 256, maxChar: \uFF9F, maxPage: 256, usedPages: 4, c2bMapSize: 775, totalElements: 1031, totalBytes: 2062 Results: pageSize: 512, maxChar: \uFF9F, maxPage: 128, usedPages: 3, c2bMapSize: 1536, totalElements: 1664, totalBytes: 2048 Results: pageSize: 256, maxChar: \uFF9F, maxPage: 256, usedPages: 3, c2bMapSize: 768, totalElements: 1024, totalBytes: 1792 Results: pageSize: 128, maxChar: \uFF9F, maxPage: 512, usedPages: 4, c2bMapSize: 512, totalElements: 1024, totalBytes: 2560 Results: pageSize: 64, maxChar: \uFF9F, maxPage: 1023, usedPages: 4, c2bMapSize: 256, totalElements: 1279, totalBytes: 4348 0000-07FF: - - 1 - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 0800-0FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 1000-17FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 1800-1FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 2000-27FF: 1 - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 2800-2FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 3000-37FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 3800-3FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 4000-47FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 4800-4FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 5000-57FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 5800-5FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 6000-67FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 6800-6FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 7000-77FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 7800-7FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 8000-87FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 8800-8FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 9000-97FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 9800-9FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; A000-A7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; A800-AFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; B000-B7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; B800-BFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; C000-C7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; C800-CFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; D000-D7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; D800-DFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; E000-E7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; E800-EFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; F000-F7FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; F800-FFFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - 31 32

Example of JIS-X-0201 charset after optimization:
=========================================
JIS_X0201 --> offset: FF40, ^mask: 0000
Old mapping: pageSize: 256, maxChar: \uFF9F, maxPage: 256, usedPages: 4, c2bMapSize: 775, totalElements: 1031, totalBytes: 2062 Results: pageSize: 512, maxChar: \uFF9F, maxPage: 17, usedPages: 2, c2bMapSize: 1024, totalElements: 1041, totalBytes: 1092 Results: pageSize: 256, maxChar: \uFF9F, maxPage: 33, usedPages: 3, c2bMapSize: 768, totalElements: 801, totalBytes: 900 Results: pageSize: 128, maxChar: \uFF9F, maxPage: 66, usedPages: 3, c2bMapSize: 384, totalElements: 450, totalBytes: 648 Results: pageSize: 64, maxChar: \uFF9F, maxPage: 132, usedPages: 4, c2bMapSize: 256, totalElements: 388, totalBytes: 784 0000-07FF: 31 32 - - - 1 - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 0800-0FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 1000-17FF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ; 1800-1FFF: - - - - - - - ; - - - - - - - ; - - - - - - - ; - - - - - - - ;
2000-27FF:   -   -   -   1

Also: map usages for all charsets: Samples <https://java-nio-charset-enhanced.dev.java.net/servlets/ProjectDocumentList?expandFolder=9507&folderID=9509>. Run the MapCalculator.java <https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/test/sun/nio/cs/MapCalculator.java?rev=&view=markup>.

Please note my project: https://java-nio-charset-enhanced.dev.java.net/

-Ulf

*
*

Reply via email to